Unit 10: Comparing Two Populations
Compare two groups: confidence intervals and significance tests for a difference of two proportions and of two means, paired data, and choosing the right procedure.
单元 10:两个总体的比较
比较两个组:两比例之差与两均值之差的置信区间和显著性检验、配对数据,以及如何选择正确的推断方法。
Each topic gives objectives, an explanation, worked examples, an exam tip, common mistakes and check questions with answers. Use the contents list to jump to a topic, then finish with the unit quiz. All data are synthetic illustrations.
每个主题含学习目标、讲解、例题、考试提示、常见错误与带答案的自测题。可用目录跳转到任一主题,最后完成单元自测。所有数据均为合成示例。
Confidence Intervals for the Difference of Two Proportions两个比例之差的置信区间
- Construct a two-proportion $z$-interval for $p_1-p_2$ using the unpooled standard error.
- Check the conditions: independent groups, random sampling or random assignment, the 10% condition, and enough successes and failures in each group.
- Interpret the interval for a difference in context, keeping track of which group is first.
- Distinguish a randomized experiment from two independent random samples and say what each allows.
- Run
2-PropZInton the TI-84 and write the result as State, Plan, Do, Conclude.
- 用未合并的标准误构造 $p_1-p_2$ 的两比例 $z$ 区间。
- 检验条件:两组独立、随机抽样或随机分配、10% 条件,以及每组有足够的成功与失败。
- 结合情境解释差异的区间,并注意哪一组在前。
- 区分随机化实验与两个独立随机样本,并说明各自允许的结论。
- 在 TI-84 上用
2-PropZInt计算,并按 State、Plan、Do、Conclude 书写。
To compare two groups, estimate the difference in population proportions $p_1-p_2$ with $\hat{p}_1-\hat{p}_2$. The sampling distribution of this difference is centred at $p_1-p_2$ and, because the groups are independent, the variances add. The two-proportion $z$-interval (2-PropZInt) is
要比较两组,用 $\hat{p}_1-\hat{p}_2$ 估计总体比例之差 $p_1-p_2$。该差的抽样分布以 $p_1-p_2$ 为中心,且因为两组独立,方差相加。两比例 $z$ 区间(2-PropZInt)为
The standard error is unpooled: each group keeps its own $\hat{p}$. (Pooling belongs to the test in topic 10.4, because only a test assumes $p_1=p_2$.)
标准误是未合并的:每组保留自己的 $\hat{p}$。(合并属于主题 10.4 的检验,因为只有检验才假定 $p_1=p_2$。)
Conditions for two groups两组的条件
(1) Independent groups, produced either by two independent random samples or by a randomized experiment with random assignment of units to two treatments. (2) 10% condition for each sample when sampling without replacement (not needed for random assignment to treatments). (3) At least 10 successes and 10 failures in each group: $n_1\hat{p}_1$, $n_1(1-\hat{p}_1)$, $n_2\hat{p}_2$ and $n_2(1-\hat{p}_2)$ are all at least 10. Random sampling supports generalizing to the sampled populations; random assignment supports a cause-and-effect conclusion about the treatments for the units in the study.
(1) 两组独立,来自两个独立随机样本,或来自把试验单位随机分配到两种处理的随机化实验。(2) 不放回抽样时每个样本满足 10% 条件(随机分配到处理时不需要)。(3) 每组至少有 10 个成功与 10 个失败:$n_1\hat{p}_1$、$n_1(1-\hat{p}_1)$、$n_2\hat{p}_2$、$n_2(1-\hat{p}_2)$ 都至少为 10。随机抽样支持推广到被抽样的总体;随机分配支持对研究中的单位作出处理的因果结论。
Worked Example: two independent random samples例题:两个独立随机样本
A random sample of 400 students at East High (large school) includes 212 who usually eat breakfast at home; a separate random sample of 500 students at West High (large school) has 215. Construct a 95% confidence interval for $p_1-p_2$, where $p_1$ and $p_2$ are the proportions of all East and West students who eat breakfast at home. (Illustrative data.)
- State. $p_1-p_2$ = difference between the proportions of all East High and all West High students who usually eat breakfast at home. Confidence level 95%.
- Plan. Two-proportion $z$-interval. Two independent random samples, each under 10% of its school. Counts: $212$, $188$, $215$, $285$ are all at least 10.
- Do. $\hat{p}_1=212/400=0.53$, $\hat{p}_2=215/500=0.43$, difference $=0.10$. Standard error $=\sqrt{\dfrac{0.53(1-0.53)}{400}+\dfrac{0.43(1-0.43)}{500}}=\sqrt{0.001113}\approx 0.0334$. Margin of error $=1.960(0.0334)\approx 0.0654$. Interval: $(0.0346,\,0.1654)$ (
2-PropZInt). - Conclude. We are 95% confident that the interval from $0.035$ to $0.165$ captures the true difference (East minus West) in the proportions of students who usually eat breakfast at home.
东高中(大校)随机抽取 400 名学生,其中 212 人通常在家吃早餐;另外独立地从西高中(大校)随机抽取 500 名学生,其中 215 人。构造 $p_1-p_2$ 的 95% 置信区间,其中 $p_1$、$p_2$ 分别是东高中与西高中全体学生在家吃早餐的比例。(示意数据。)
- State。$p_1-p_2$ = 东高中与西高中全体学生中通常在家吃早餐的比例之差。置信水平 95%。
- Plan。两比例 $z$ 区间。两个独立随机样本,各自不到本校学生的 10%。计数:$212$、$188$、$215$、$285$ 都至少为 10。
- Do。$\hat{p}_1=212/400=0.53$,$\hat{p}_2=215/500=0.43$,差 $=0.10$。标准误 $=\sqrt{\dfrac{0.53(1-0.53)}{400}+\dfrac{0.43(1-0.43)}{500}}=\sqrt{0.001113}\approx 0.0334$。误差范围 $=1.960(0.0334)\approx 0.0654$。区间:$(0.0346,\,0.1654)$(
2-PropZInt)。 - Conclude。我们有 95% 的把握认为,从 $0.035$ 到 $0.165$ 的区间覆盖了通常在家吃早餐的学生比例的真实差(东高中减西高中)。
Worked Example: a randomized experiment例题:随机化实验
180 volunteers in an online course are randomly assigned, 90 each, to receive reminders by text message (group 1) or by email (group 2). Afterwards 72 of the text group and 58 of the email group completed the course. Construct a 90% confidence interval for $p_1-p_2$, where $p_i$ is the true proportion who would complete the course under reminder method $i$. (Illustrative data.)
- Plan. Randomized experiment with random assignment, so the groups are independent and the 10% condition is not needed. Counts: $72$, $18$, $58$, $32$ are all at least 10.
- Do. $\hat{p}_1=72/90=0.8000$ and $\hat{p}_2=58/90\approx 0.6444$; difference $\approx 0.1556$. Standard error $=\sqrt{\dfrac{0.8(0.2)}{90}+\dfrac{0.6444(1-0.6444)}{90}}\approx 0.0658$. With $z^*=1.645$, margin of error $\approx 0.1082$. Interval: $(0.0474,\,0.2637)$.
- Conclude. We are 90% confident that the interval from $0.047$ to $0.264$ captures the true difference (text minus email) in the proportions of volunteers like these who would complete the course.
- Scope. Random assignment allows a cause-and-effect conclusion about the reminder method for these volunteers; because the volunteers were not randomly selected, the result is not generalized to all online students.
某网络课程的 180 名志愿者被随机分配(每组 90 人)到短信提醒(第 1 组)或邮件提醒(第 2 组)。之后短信组 72 人、邮件组 58 人完成了课程。构造 $p_1-p_2$ 的 90% 置信区间,其中 $p_i$ 是采用提醒方式 $i$ 时完成课程的真实比例。(示意数据。)
- Plan。有随机分配的随机化实验,所以两组独立,不需要 10% 条件。计数:$72$、$18$、$58$、$32$ 都至少为 10。
- Do。$\hat{p}_1=72/90=0.8000$,$\hat{p}_2=58/90\approx 0.6444$;差 $\approx 0.1556$。标准误 $=\sqrt{\dfrac{0.8(0.2)}{90}+\dfrac{0.6444(1-0.6444)}{90}}\approx 0.0658$。取 $z^*=1.645$,误差范围 $\approx 0.1082$。区间:$(0.0474,\,0.2637)$。
- Conclude。我们有 90% 的把握认为,从 $0.047$ 到 $0.264$ 的区间覆盖了与这些志愿者相似的人完成课程比例的真实差(短信减邮件)。
- 适用范围。随机分配允许对这些志愿者就提醒方式作出因果结论;因为志愿者不是随机选出的,结果不推广到所有网络课程学生。
Press STAT, arrow to TESTS, and choose 2-PropZInt. Enter x1, n1, x2, n2 (counts are whole numbers) and C-Level. The output gives the interval, both sample proportions and both sample sizes. Keep the order of the groups consistent with how you defined $p_1-p_2$.
按 STAT,移到 TESTS,选择 2-PropZInt。输入 x1、n1、x2、n2(计数为整数)和 C-Level。输出给出区间、两个样本比例和两个样本容量。组的顺序要与你定义 $p_1-p_2$ 的方式一致。
Do not pool the two proportions for an interval, and do not add the two standard errors: add the variances and then take the square root. Also, the interval is about the difference $p_1-p_2$, so interpret it as a difference ("East minus West"), not as two separate intervals.
构造区间时不要合并两个比例,也不要把两个标准误直接相加:应先把方差相加再开方。另外,区间针对的是差 $p_1-p_2$,所以要按差来解释(“东高中减西高中”),而不是当作两个单独的区间。
Worked Example: a 99% interval from an experiment, and why the confidence level matters例题:来自实验的 99% 区间,以及置信水平为何重要
A hospital randomly assigns 300 volunteer patients, 150 to a new rehabilitation protocol (Group 1) and 150 to the standard protocol (Group 2). After 14 days, 96 patients in Group 1 and 78 in Group 2 reached their walking goal. Estimate the difference in the proportions who would reach the goal, with 99% confidence, and say what the interval does and does not show.
- State. $p_1-p_2$ = difference (new minus standard) between the proportions of patients like these who would reach the walking goal after 14 days. Confidence level 99%.
- Plan. Two-proportion $z$-interval. Random assignment makes the groups independent, so the 10% condition is not needed. Counts: $96$, $54$, $78$, $72$ are all at least 10.
- Do. $\hat{p}_1=96/150=0.64$, $\hat{p}_2=78/150=0.52$, difference $=0.12$. Standard error $=\sqrt{\dfrac{0.64(0.36)}{150}+\dfrac{0.52(0.48)}{150}}\approx 0.0566$. With $z^*=2.576$, margin of error $\approx 0.1457$. Interval: $(-0.0257,\,0.2657)$.
- Conclude. We are 99% confident that the true difference (new minus standard) in the proportions who would reach the goal is between $-0.026$ and $0.266$. The interval contains 0, so there is not convincing evidence that the new protocol raises the proportion, even though the sample difference is $0.12$.
- Effect of the level. At 95% the margin of error is $1.960(0.0566)\approx 0.1109$ and the interval is $(0.0091,\,0.2309)$, which excludes 0. A higher confidence level gives a wider interval, so the same data can support a difference at one level and not at another. A complete answer states the level it used.
- Scope. Random assignment supports a cause-and-effect conclusion about the protocol for these volunteers; the volunteers were not randomly selected, so the result is not generalized to all patients.
一家医院把 300 名志愿者患者随机分配,150 人用新的康复方案(组 1),150 人用标准方案(组 2)。14 天后,组 1 有 96 人、组 2 有 78 人达到步行目标。以 99% 的置信水平估计达到目标的比例之差,并说明该区间能说明什么、不能说明什么。
- State。$p_1-p_2$ = 与这些患者相似的人在 14 天后达到步行目标的比例之差(新方案减标准方案)。置信水平 99%。
- Plan。两比例 $z$ 区间。随机分配使两组独立,不需要 10% 条件。计数:$96$、$54$、$78$、$72$ 都至少为 10。
- Do。$\hat{p}_1=96/150=0.64$,$\hat{p}_2=78/150=0.52$,差 $=0.12$。标准误 $=\sqrt{\dfrac{0.64(0.36)}{150}+\dfrac{0.52(0.48)}{150}}\approx 0.0566$。取 $z^*=2.576$,误差范围 $\approx 0.1457$。区间:$(-0.0257,\,0.2657)$。
- Conclude。我们有 99% 的把握认为,达到目标的比例之差(新方案减标准方案)的真实值在 $-0.026$ 与 $0.266$ 之间。区间包含 0,所以没有令人信服的证据表明新方案提高了该比例,尽管样本差为 $0.12$。
- 置信水平的影响。取 95% 时,误差范围为 $1.960(0.0566)\approx 0.1109$,区间为 $(0.0091,\,0.2309)$,不含 0。置信水平越高,区间越宽,所以同一份数据在一个水平下能支持有差异,在另一个水平下却不能。完整的答案要写明所用的水平。
- 适用范围。随机分配支持对这些志愿者就该方案作因果结论;志愿者不是随机选出的,结果不推广到所有患者。
Name both groups and the order: "the difference (East minus West) in the proportions of all students who ...". Check four counts, not two, and say whether the groups come from two random samples or from random assignment, because that decides what the conclusion may claim.
点明两组及其顺序:“全体学生中……比例之差(东高中减西高中)”。要检查四个计数而不是两个,并说明两组来自两个随机样本还是随机分配,因为这决定结论能声称什么。
In a two-proportion interval, what two things can make the groups independent?在两比例区间中,哪两种做法可以保证两组独立?
Two independent random samples from two populations, or random assignment of units to two treatments in a randomized experiment.
从两个总体分别独立随机抽样,或在随机化实验中把单位随机分配到两种处理。
Group 1 has $n_1=50$ with 8 successes; group 2 has $n_2=60$ with 21 successes. Does the counts condition hold?第 1 组 $n_1=50$,8 个成功;第 2 组 $n_2=60$,21 个成功。计数条件成立吗?
No. Group 1 has only $8$ successes, which is less than 10 (its failures, $42$, and group 2's counts $21$ and $39$ are fine). All four counts must be at least 10.
不成立。第 1 组成功数只有 $8$,少于 10(其失败数 $42$ 以及第 2 组的 $21$ 和 $39$ 都没问题)。四个计数必须都至少为 10。
A 95% interval for $p_1-p_2$ is $(0.02,\,0.12)$, with $p_1$ for treatment A and $p_2$ for treatment B. Interpret it in context.$p_1-p_2$ 的 95% 区间为 $(0.02,\,0.12)$,$p_1$ 对应处理 A,$p_2$ 对应处理 B。结合情境解释。
We are 95% confident that the true proportion of successes under treatment A is between $0.02$ and $0.12$ higher than under treatment B.
我们有 95% 的把握认为,处理 A 下成功的真实比例比处理 B 高 $0.02$ 到 $0.12$。
Justifying a Claim Based on a Confidence Interval for a Difference of Proportions依据比例之差的置信区间论证说法
- Decide whether an interval for $p_1-p_2$ contains 0 and what that says about a difference.
- Justify a claim about a difference using the sign and location of the whole interval.
- Explain why an interval containing 0 does not show that the proportions are equal.
- Report the size of a plausible difference, with direction, in context.
- State what the study design (random sampling or random assignment) allows the claim to say.
- 判断 $p_1-p_2$ 的区间是否含 0,以及这对差异意味着什么。
- 利用整个区间的符号与位置论证关于差异的说法。
- 解释为什么区间含 0 并不说明两个比例相等。
- 结合情境,带方向地报告合理差异的大小。
- 说明研究设计(随机抽样或随机分配)允许结论说什么。
Zero is the key number: $p_1-p_2=0$ means the two population proportions are equal. If the interval for the difference contains 0, then "no difference" is plausible and the data do not provide convincing evidence of a difference. If the interval does not contain 0 and lies entirely above it, there is convincing evidence that $p_1>p_2$; entirely below it, that $p_1<p_2$. The endpoints also say how large the difference could plausibly be, which is more informative than a yes or no.
0 是关键数:$p_1-p_2=0$ 表示两个总体比例相等。若差的区间含 0,则“无差异”是合理的,数据没有提供差异的令人信服的证据。若区间不含 0且全在 0 之上,则有令人信服的证据表明 $p_1>p_2$;全在 0 之下则表明 $p_1<p_2$。端点还说明了差异可能有多大,这比单纯的“是”或“否”信息更丰富。
Worked Example: an interval that excludes 0例题:不含 0 的区间
Using the 95% interval $(0.035,\,0.165)$ for East minus West from topic 10.1, evaluate the student council's claim that a larger proportion of East students than West students eat breakfast at home.
- Location. The interval does not contain 0, and every value in it is positive.
- Justify. Because every plausible value of $p_1-p_2$ is greater than 0, the claim is supported: there is convincing evidence that the true proportion of East students who eat breakfast at home is greater than that of West students.
- Size. We estimate the East proportion exceeds the West proportion by between about $3.5$ and $16.5$ percentage points. Because the samples were random (not randomly assigned), this shows an association between school and habit, not that the school causes it.
利用主题 10.1 中东高中减西高中的 95% 区间 $(0.035,\,0.165)$,评价学生会的说法:东高中在家吃早餐的学生比例高于西高中。
- 位置。区间不含 0,且其中每个值都为正。
- 论证。因为 $p_1-p_2$ 的每个合理取值都大于 0,该说法得到支持:有令人信服的证据表明,东高中学生在家吃早餐的真实比例大于西高中。
- 大小。我们估计东高中的比例比西高中高约 $3.5$ 到 $16.5$ 个百分点。因为样本是随机抽取的(不是随机分配的),这表明学校与习惯之间有关联,而不是学校导致了该习惯。
Worked Example: an interval that contains 0例题:含 0 的区间
A random sample of 120 students in one grade has 54 who prefer morning study sessions; a separate random sample of 150 students in another grade has 57. A teacher claims the two grades differ in the proportion preferring mornings. Evaluate the claim with a 95% interval. (Illustrative data.)
- Conditions. Independent random samples; each under 10% of its grade (assumed); counts $54$, $66$, $57$, $93$ are all at least 10.
- Interval. $\hat{p}_1=0.45$, $\hat{p}_2=0.38$, difference $0.07$. Standard error $=\sqrt{0.003633}\approx 0.0603$; margin of error $\approx 0.1181$. Interval: $(-0.0481,\,0.1881)$.
- Justify. The interval contains 0, so "no difference" is plausible. The interval also contains positive and negative values.
- Conclude. The interval does not provide convincing evidence that the true proportions of students preferring morning study sessions differ between the two grades. This does not show the proportions are equal: differences from about $-0.05$ to $0.19$ remain plausible.
某年级随机抽取 120 名学生,其中 54 人喜欢早上自习;另一年级独立随机抽取 150 名学生,其中 57 人。老师称两个年级喜欢早上自习的比例不同。用 95% 区间评价该说法。(示意数据。)
- 条件。独立随机样本;各自不到本年级的 10%(假设);计数 $54$、$66$、$57$、$93$ 都至少为 10。
- 区间。$\hat{p}_1=0.45$,$\hat{p}_2=0.38$,差 $0.07$。标准误 $=\sqrt{0.003633}\approx 0.0603$;误差范围 $\approx 0.1181$。区间:$(-0.0481,\,0.1881)$。
- 论证。区间含 0,所以“无差异”是合理的。区间内既有正值也有负值。
- Conclude。该区间没有提供令人信服的证据表明,两个年级喜欢早上自习的学生真实比例不同。这并不说明两个比例相等:从约 $-0.05$ 到 $0.19$ 的差异仍然合理。
Worked Example: using the experiment interval to judge "equally effective"例题:用实验区间判断“同样有效”
From topic 10.1, the 90% interval for text minus email completion rates is $(0.047,\,0.264)$. A course designer claims the two reminder methods are equally effective. Evaluate the claim.
- Location. The interval does not contain 0; it lies entirely above 0.
- Conclude. There is convincing evidence that the true completion proportion is higher with text reminders than with email reminders for volunteers like these, so "equally effective" is not plausible.
- Why causal. The volunteers were randomly assigned to the two methods, so a difference this large is unlikely to be due to who ended up in which group.
由主题 10.1,短信减邮件完成率的 90% 区间为 $(0.047,\,0.264)$。课程设计者声称两种提醒方式同样有效。评价该说法。
- 位置。区间不含 0,完全在 0 之上。
- Conclude。有令人信服的证据表明,对与这些志愿者相似的人,短信提醒下的真实完成比例高于邮件提醒,所以“同样有效”并不合理。
- 为何可下因果结论。志愿者被随机分配到两种方式,所以如此大的差异不太可能是由谁分到哪一组造成的。
An interval containing 0 means a difference of zero cannot be ruled out, not that the two proportions are the same. Another frequent mistake is to compare the two groups by checking whether two separate one-sample intervals overlap; use one interval for the difference.
区间含 0 只说明不能排除差为零,并不说明两个比例相同。另一个常见错误是通过两个单独的单样本区间是否重叠来比较两组;应当使用差的那一个区间。
State where 0 sits relative to the interval, then link it to the claim in context, with the direction in the correct order ("East is greater than West"). Mention causation only for randomized experiments, and say what population the result applies to.
说明 0 相对区间的位置,再联系情境中的说法,并以正确的顺序写出方向(“东高中大于西高中”)。只有随机化实验才可以谈因果,并说明结果适用于哪个总体。
A 95% interval for $p_1-p_2$ is $(-0.08,\,0.03)$. What can you conclude about a difference?$p_1-p_2$ 的 95% 区间为 $(-0.08,\,0.03)$。关于差异可得出什么结论?
The interval contains 0, so there is not convincing evidence of a difference between the two population proportions. Zero difference remains plausible.
区间含 0,所以没有令人信服的证据表明两个总体比例有差异。差为零仍然合理。
A 95% interval for $p_1-p_2$ is $(0.04,\,0.10)$. Write the conclusion for a claim that $p_1>p_2$.$p_1-p_2$ 的 95% 区间为 $(0.04,\,0.10)$。对 $p_1>p_2$ 的说法写出结论。
The interval lies entirely above 0, so there is convincing evidence that $p_1$ is greater than $p_2$, by roughly $0.04$ to $0.10$.
区间完全在 0 之上,所以有令人信服的证据表明 $p_1$ 大于 $p_2$,大约大 $0.04$ 到 $0.10$。
Why can an experiment's interval support a causal claim, but two random samples' interval cannot?为什么实验的区间可以支持因果说法,而两个随机样本的区间不能?
Random assignment balances other variables across groups, so a real difference can be attributed to the treatment. Random sampling without assignment shows only an association in the sampled populations.
随机分配使其他变量在各组间得到平衡,所以真实的差异可以归因于处理。只随机抽样而不分配,只能在被抽样的总体中说明关联。
Setting Up a Test for the Difference of Two Population Proportions设置两个总体比例之差的检验
- Write $H_0$ and $H_a$ for a comparison of two proportions, defining $p_1$ and $p_2$ in words.
- Choose a one-sided or two-sided alternative from the question wording.
- Explain why $H_0$ is $p_1=p_2$ and what that says about the difference.
- Compute the pooled (combined) proportion and use it for the expected-count check.
- State the conditions for a two-proportion $z$-test.
- 为两个比例的比较写出 $H_0$ 与 $H_a$,并用文字定义 $p_1$ 和 $p_2$。
- 依据题目措辞选择单侧或双侧备择假设。
- 解释为什么 $H_0$ 是 $p_1=p_2$,以及它对差意味着什么。
- 计算合并(联合)比例,并用它检查预期计数。
- 写出两比例 $z$ 检验的条件。
The null hypothesis for comparing two groups says there is no difference: $H_0: p_1=p_2$, which is the same as $H_0: p_1-p_2=0$. The alternative hypothesis is $H_a: p_1>p_2$, $H_a: p_1<p_2$ or $H_a: p_1\ne p_2$, chosen from the question before seeing the data. Define each parameter in words, with the group, population and variable, and keep the order of the groups the same throughout: if $p_1$ is the treatment group, $H_a: p_1>p_2$ means the treatment does better.
比较两组的原假设说明没有差异:$H_0: p_1=p_2$,等价于 $H_0: p_1-p_2=0$。备择假设是 $H_a: p_1>p_2$、$H_a: p_1<p_2$ 或 $H_a: p_1\ne p_2$,须在看数据之前由问题决定。要用文字定义每个参数,写明组别、总体和变量,并在全过程中保持组的顺序不变:若 $p_1$ 是处理组,则 $H_a: p_1>p_2$ 表示处理效果更好。
The pooled proportion and conditions合并比例与条件
Because $H_0$ says both groups share one proportion, the best single estimate of that common value combines the two samples. The pooled (combined) proportion is $\hat{p}_c=\dfrac{x_1+x_2}{n_1+n_2}$, where $x_1$ and $x_2$ are the success counts. The conditions are: (1) independent groups from two random samples or a randomized experiment with random assignment; (2) the 10% condition for each sample when sampling without replacement (not needed for random assignment); (3) the expected counts under $H_0$, $n_1\hat{p}_c$, $n_1(1-\hat{p}_c)$, $n_2\hat{p}_c$ and $n_2(1-\hat{p}_c)$, are all at least 10. (Checking the observed successes and failures in each group is a common alternative; in the examples here both checks agree. For a confidence interval in topic 10.1 the check uses the separate counts of each group instead of the pooled proportion.)
因为 $H_0$ 说两组共享同一个比例,对这个共同值最好的单一估计要把两个样本合在一起。合并(联合)比例为 $\hat{p}_c=\dfrac{x_1+x_2}{n_1+n_2}$,其中 $x_1$、$x_2$ 为成功计数。条件是:(1) 两组独立,来自两个随机样本或有随机分配的随机化实验;(2) 不放回抽样时每个样本的 10% 条件(随机分配时不需要);(3) $H_0$ 下的预期计数 $n_1\hat{p}_c$、$n_1(1-\hat{p}_c)$、$n_2\hat{p}_c$、$n_2(1-\hat{p}_c)$ 都至少为 10。(检查每组观察到的成功数与失败数是常见的替代做法;本节例子里两种检查结论一致。对主题 10.1 的置信区间,则用每组各自的计数检查,而不用合并比例。)
Worked Example: hypotheses for comparing two proportions例题:写出比较两个比例的假设
Write $H_0$ and $H_a$ for each study, defining the parameters. (a) A quality engineer asks whether the proportion of defective parts differs between Machine A and Machine B. (b) In a randomized experiment, 100 volunteers use a reminder app and 100 get standard reminders; the researchers want evidence that the app raises the proportion who follow their plan. (Illustrative.)
- (a) $p_1$ = proportion of all parts made by Machine A that are defective; $p_2$ = the same for Machine B. $H_0: p_1=p_2$, $H_a: p_1\ne p_2$ (two-sided: "differs").
- (b) $p_1$ = the true proportion who would follow their plan with the app; $p_2$ = the true proportion who would with standard reminders. $H_0: p_1=p_2$, $H_a: p_1>p_2$ (one-sided: "raises").
- Check. Each $H_a$ is in terms of parameters, in the same group order as the definitions, and $H_0$ always states equality.
为每项研究写出 $H_0$ 与 $H_a$ 并定义参数。(a) 质量工程师想知道机器 A 与机器 B 生产的次品比例是否不同。(b) 在随机化实验中,100 名志愿者使用提醒应用,100 人使用标准提醒;研究者想要证据表明该应用提高了坚持计划的人的比例。(示意。)
- (a) $p_1$ = 机器 A 生产的全部零件中次品的比例;$p_2$ = 机器 B 的相应比例。$H_0: p_1=p_2$,$H_a: p_1\ne p_2$(双侧:“不同”)。
- (b) $p_1$ = 使用该应用时坚持计划的真实比例;$p_2$ = 使用标准提醒时的真实比例。$H_0: p_1=p_2$,$H_a: p_1>p_2$(单侧:“提高”)。
- 核对。每个 $H_a$ 都用参数表示,组的顺序与定义一致,而 $H_0$ 总是陈述相等。
Worked Example: pooled proportion and the counts check例题:合并比例与计数检验
In the app experiment, 68 of 100 app users and 54 of 100 standard-reminder users followed their plan. Compute the pooled proportion and check the expected counts. Then repeat the check for a small study with 6 of 40 and 9 of 50 successes. (Illustrative data.)
- App study. $\hat{p}_c=\dfrac{68+54}{100+100}=\dfrac{122}{200}=0.610$. Expected counts: $100(0.610)=61.0$ and $100(1-0.610)=39.0$ in each group. All are at least 10, so the condition holds.
- Small study. $\hat{p}_c=\dfrac{6+9}{40+50}=\dfrac{15}{90}\approx 0.167$. Expected successes: $40(0.167)\approx 6.7$ and $50(0.167)\approx 8.3$, both under 10. The condition fails.
- Consequence. For the small study the normal model for the difference is not trustworthy, so a two-proportion $z$-test should not be used. The observed counts, 6 and 9 successes, also fall short.
在应用实验中,100 名应用用户中有 68 人、100 名标准提醒用户中有 54 人坚持了计划。计算合并比例并检查预期计数。然后对另一项小研究(40 人中 6 个成功、50 人中 9 个成功)重复检查。(示意数据。)
- 应用研究。$\hat{p}_c=\dfrac{68+54}{100+100}=\dfrac{122}{200}=0.610$。每组预期计数:$100(0.610)=61.0$ 与 $100(1-0.610)=39.0$。全都至少为 10,条件成立。
- 小研究。$\hat{p}_c=\dfrac{6+9}{40+50}=\dfrac{15}{90}\approx 0.167$。预期成功数:$40(0.167)\approx 6.7$ 与 $50(0.167)\approx 8.3$,均小于 10。条件不成立。
- 后果。对这项小研究,差的正态模型不可靠,不应使用两比例 $z$ 检验。观察到的成功数 6 和 9 也不足。
Do not write $H_0: \hat{p}_1=\hat{p}_2$; the samples will almost never be exactly equal, and hypotheses are about parameters. Do not write $H_a$ as "the groups are different" without the symbols, and do not define $p_1$ and $p_2$ in one order but use them in another.
不要写 $H_0: \hat{p}_1=\hat{p}_2$;样本几乎不可能恰好相等,而且假设讨论的是参数。不要只用文字写 $H_a$ 而不带符号,也不要以一种顺序定义 $p_1$ 与 $p_2$ 却以另一种顺序使用。
Worked Example: setting up a test from a directional claim, with the counts check例题:根据有方向的说法设置检验,并做计数检查
A clinic claims that a nicotine patch helps more smokers quit for 30 days than nicotine gum. It randomly assigns 200 volunteers: 90 receive the patch (Group 1) and 110 receive the gum (Group 2). Afterwards 45 patch users and 33 gum users have quit. Set up the test; do not compute the statistic yet.
- Parameters. $p_1$ = the true proportion of volunteers like these who would quit for 30 days with the patch; $p_2$ = the same with the gum.
- Hypotheses. The claim says the patch helps more, so the alternative is one-sided: $H_0: p_1=p_2$ and $H_a: p_1>p_2$. The sample proportions $0.50$ and $0.30$ appear in neither hypothesis, because hypotheses describe parameters.
- Pooled proportion. $\hat{p}_c=\dfrac{45+33}{90+110}=\dfrac{78}{200}=0.39$.
- Counts check. $90(0.39)=35.1$, $90(0.61)=54.9$, $110(0.39)=42.9$, $110(0.61)=67.1$ are all at least 10, so a Normal model for $\hat{p}_1-\hat{p}_2$ is reasonable. Random assignment gives independent groups and the 10% condition is not needed.
- Procedure. Two-proportion $z$-test (
2-PropZTest, with $p_1>p_2$ selected). - If the claim were different. If the clinic said only that the methods differ, the alternative would be $H_a: p_1\ne p_2$, chosen before seeing the data; the pooled proportion and the counts check would not change.
一家诊所声称尼古丁贴片比尼古丁口香糖能让更多吸烟者戒烟 30 天。它把 200 名志愿者随机分配:90 人用贴片(组 1),110 人用口香糖(组 2)。之后有 45 名贴片使用者和 33 名口香糖使用者成功戒烟。请设置检验,先不计算统计量。
- 参数。$p_1$ = 与这些志愿者相似的人使用贴片戒烟 30 天的真实比例;$p_2$ = 使用口香糖的相应比例。
- 假设。说法是贴片帮助的人更多,所以备择假设是单侧的:$H_0: p_1=p_2$,$H_a: p_1>p_2$。样本比例 $0.50$ 与 $0.30$ 不出现在任何一个假设中,因为假设描述的是参数。
- 合并比例。$\hat{p}_c=\dfrac{45+33}{90+110}=\dfrac{78}{200}=0.39$。
- 计数检查。$90(0.39)=35.1$,$90(0.61)=54.9$,$110(0.39)=42.9$,$110(0.61)=67.1$ 都至少为 10,所以 $\hat{p}_1-\hat{p}_2$ 可以用正态模型。随机分配使两组独立,不需要 10% 条件。
- 程序。两比例 $z$ 检验(
2-PropZTest,选 $p_1>p_2$)。 - 如果说法不同。若诊所只说两种方法不同,备择假设应是 $H_a: p_1\ne p_2$,并且要在看数据之前确定;合并比例与计数检查都不变。
Write the hypotheses with both parameters defined, the name "two-proportion $z$-test," and the conditions with the numbers from the pooled proportion. Note that, unlike an interval, a test of $H_0: p_1=p_2$ uses one combined $\hat{p}_c$ in its standard error.
写出带两个参数定义的假设、检验名称“两比例 $z$ 检验”,以及用合并比例算出的带数字的条件。注意:与区间不同,检验 $H_0: p_1=p_2$ 的标准误使用一个合并的 $\hat{p}_c$。
Write the hypotheses to test whether a vaccine lowers the proportion of people who get sick, with $p_1$ for vaccinated and $p_2$ for unvaccinated people in the population of interest.写出检验疫苗是否降低发病人群比例的假设,其中 $p_1$ 为有关人群中接种者的比例,$p_2$ 为未接种者的比例。
$H_0: p_1=p_2$ and $H_a: p_1<p_2$, where $p_1$ and $p_2$ are the proportions who get sick among vaccinated and unvaccinated people.
$H_0: p_1=p_2$,$H_a: p_1<p_2$,其中 $p_1$、$p_2$ 分别是接种者与未接种者中发病的比例。
Compute the pooled proportion for 30 of 80 successes in group 1 and 45 of 120 in group 2.对第 1 组 80 人中 30 个成功、第 2 组 120 人中 45 个成功,计算合并比例。
$\hat{p}_c=\dfrac{30+45}{80+120}=\dfrac{75}{200}=0.375$.
$\hat{p}_c=\dfrac{30+45}{80+120}=\dfrac{75}{200}=0.375$。
Why does a test of $H_0: p_1=p_2$ pool the samples?为什么检验 $H_0: p_1=p_2$ 要合并样本?
The test assumes $H_0$ is true, so both groups share one proportion; combining the two samples gives the best single estimate of it.
检验假定 $H_0$ 为真,即两组共享同一个比例;把两个样本合在一起就得到对它的最佳单一估计。
Carrying Out a Test for the Difference of Two Population Proportions执行两个总体比例之差的检验
- Calculate the two-proportion $z$ test statistic using the pooled proportion.
- Find the p-value in the direction of $H_a$ and make a decision at the stated $\alpha$.
- Write a conclusion in context about the difference, with an appropriate statement about causation or generalization.
- Carry out the test as State, Plan, Do, Conclude and verify it with
2-PropZTest. - Explain when to pool (tests) and when not to pool (intervals).
- 用合并比例计算两比例 $z$ 检验统计量。
- 沿 $H_a$ 的方向求 p 值,并在规定的 $\alpha$ 下作出决定。
- 结合情境就差异写出结论,并恰当说明因果或推广。
- 按 State、Plan、Do、Conclude 完成检验,并用
2-PropZTest核对。 - 解释何时合并(检验)、何时不合并(区间)。
The two-proportion $z$-test (2-PropZTest) measures how many standard errors the observed difference $\hat{p}_1-\hat{p}_2$ is from the null value 0. The standard error uses the pooled proportion $\hat{p}_c$ because $H_0$ says both groups share one proportion:
两比例 $z$ 检验(2-PropZTest)衡量观察到的差 $\hat{p}_1-\hat{p}_2$ 离原假设值 0 有多少个标准误。标准误使用合并比例 $\hat{p}_c$,因为 $H_0$ 说两组共享同一个比例:
Then find the p-value in the direction of $H_a$ (double the tail for $p_1\ne p_2$), compare it with $\alpha$, and write the conclusion in context. Use the four-step structure: State the hypotheses, parameters and $\alpha$; Plan by naming the test and checking conditions; Do the calculation; Conclude in context, tied to the p-value. Reminder: use the pooled $\hat{p}_c$ only in the test; a confidence interval for $p_1-p_2$ keeps the two separate $\hat{p}$ values.
然后沿 $H_a$ 的方向求 p 值($p_1\ne p_2$ 时尾部面积加倍),与 $\alpha$ 比较,并结合情境写出结论。使用四步结构:State 写假设、参数和 $\alpha$;Plan 写检验名称并检验条件;Do 完成计算;Conclude 结合情境并与 p 值挂钩。提醒:合并的 $\hat{p}_c$ 只用于检验;$p_1-p_2$ 的置信区间保留两个独立的 $\hat{p}$。
Worked Example: a randomized experiment with a one-sided test例题:单侧检验的随机化实验
A researcher randomly assigns 200 volunteers to use a reminder app (group 1, $n_1=100$) or standard reminders (group 2, $n_2=100$). In the app group 68 followed their plan; in the standard group 54 did. Is there convincing evidence that the app increases the proportion who follow their plan? Use $\alpha=0.05$. (Illustrative data.)
- State. $p_1$ = true proportion who would follow their plan with the app; $p_2$ = true proportion with standard reminders. $H_0: p_1=p_2$, $H_a: p_1>p_2$, $\alpha=0.05$.
- Plan. Two-proportion $z$-test. Random assignment, so independent groups. Pooled $\hat{p}_c=122/200=0.610$; expected counts $61.0$ and $39.0$ in each group, all at least 10.
- Do. $\hat{p}_1=0.68$, $\hat{p}_2=0.54$, difference $=0.14$. $z=\dfrac{0.14}{\sqrt{0.610(1-0.610)\left(\dfrac{1}{100}+\dfrac{1}{100}\right)}}=\dfrac{0.14}{0.0690}\approx 2.03$. p-value $=P(Z\ge 2.03)\approx 0.0212$ (
2-PropZTest, $p_1>p_2$). - Conclude. Because the p-value of about $0.021$ is less than $\alpha=0.05$, we reject $H_0$. There is convincing evidence that the true proportion who follow their plan is higher with the app than with standard reminders for volunteers like these. Random assignment supports the cause-and-effect wording; the volunteers were not randomly selected, so we do not generalize beyond similar volunteers.
研究者把 200 名志愿者随机分配到使用提醒应用(第 1 组,$n_1=100$)或标准提醒(第 2 组,$n_2=100$)。应用组有 68 人坚持了计划,标准组有 54 人。是否有令人信服的证据表明该应用提高了坚持计划的人的比例?取 $\alpha=0.05$。(示意数据。)
- State。$p_1$ = 使用该应用时坚持计划的真实比例;$p_2$ = 使用标准提醒时的真实比例。$H_0: p_1=p_2$,$H_a: p_1>p_2$,$\alpha=0.05$。
- Plan。两比例 $z$ 检验。随机分配,所以两组独立。合并比例 $\hat{p}_c=122/200=0.610$;每组预期计数 $61.0$ 与 $39.0$,全都至少为 10。
- Do。$\hat{p}_1=0.68$,$\hat{p}_2=0.54$,差 $=0.14$。$z=\dfrac{0.14}{\sqrt{0.610(1-0.610)\left(\dfrac{1}{100}+\dfrac{1}{100}\right)}}=\dfrac{0.14}{0.0690}\approx 2.03$。p 值 $=P(Z\ge 2.03)\approx 0.0212$(
2-PropZTest,$p_1>p_2$)。 - Conclude。因为 p 值约 $0.021$ 小于 $\alpha=0.05$,我们拒绝 $H_0$。有令人信服的证据表明,对与这些志愿者相似的人,使用应用时坚持计划的真实比例高于标准提醒。随机分配支持因果措辞;志愿者不是随机选出的,所以不推广到相似志愿者之外。
Worked Example: two random samples with a two-sided test例题:双侧检验的两个随机样本
A random sample of 150 voters in District X has 66 who support a proposal; an independent random sample of 200 voters in District Y has 98. Is there convincing evidence that the proportions of all voters supporting the proposal differ between the districts? Use $\alpha=0.05$. (Illustrative data.)
- State. $p_1$ and $p_2$ are the proportions of all voters in Districts X and Y who support the proposal. $H_0: p_1=p_2$, $H_a: p_1\ne p_2$, $\alpha=0.05$.
- Plan. Two-proportion $z$-test. Independent random samples, each under 10% of its district. Pooled $\hat{p}_c=164/350\approx 0.469$; expected counts $70.3$, $79.7$, $93.7$, $106.3$, all at least 10.
- Do. $\hat{p}_1=0.44$, $\hat{p}_2=0.49$, difference $=-0.05$. $z=\dfrac{-0.05}{\sqrt{0.469(1-0.469)\left(\dfrac{1}{150}+\dfrac{1}{200}\right)}}\approx\dfrac{-0.05}{0.0539}\approx -0.93$. Two-sided p-value $\approx 0.3536$.
- Conclude. Because the p-value of about $0.35$ is greater than $\alpha=0.05$, we fail to reject $H_0$. There is not convincing evidence that the proportions of voters supporting the proposal differ between District X and District Y. This does not show the two proportions are equal.
X 区随机抽取 150 名选民,其中 66 人支持一项提案;Y 区独立随机抽取 200 名选民,其中 98 人支持。是否有令人信服的证据表明两区全体选民支持该提案的比例不同?取 $\alpha=0.05$。(示意数据。)
- State。$p_1$、$p_2$ 分别是 X 区和 Y 区全体选民中支持该提案的比例。$H_0: p_1=p_2$,$H_a: p_1\ne p_2$,$\alpha=0.05$。
- Plan。两比例 $z$ 检验。独立随机样本,各自不到本区选民的 10%。合并比例 $\hat{p}_c=164/350\approx 0.469$;预期计数 $70.3$、$79.7$、$93.7$、$106.3$,全都至少为 10。
- Do。$\hat{p}_1=0.44$,$\hat{p}_2=0.49$,差 $=-0.05$。$z=\dfrac{-0.05}{\sqrt{0.469(1-0.469)\left(\dfrac{1}{150}+\dfrac{1}{200}\right)}}\approx\dfrac{-0.05}{0.0539}\approx -0.93$。双侧 p 值 $\approx 0.3536$。
- Conclude。因为 p 值约 $0.35$ 大于 $\alpha=0.05$,我们不拒绝 $H_0$。没有令人信服的证据表明 X 区与 Y 区支持该提案的选民比例不同。这并不说明两个比例相等。
Press STAT, arrow to TESTS, and choose 2-PropZTest. Enter x1, n1, x2, n2 and choose p1 as ≠p2, <p2 or >p2 to match $H_a$. Calculate gives $z$, the p-value, both sample proportions and the pooled proportion. Write the hypotheses, conditions and conclusion yourself.
按 STAT,移到 TESTS,选择 2-PropZTest。输入 x1、n1、x2、n2,并按 $H_a$ 把 p1 选为 ≠p2、<p2 或 >p2。Calculate 给出 $z$、p 值、两个样本比例和合并比例。假设、条件与结论仍要自己写。
Using the unpooled standard error in a test, or the pooled one in an interval, is a frequent slip. Another is reversing the order: if $\hat{p}_1<\hat{p}_2$ the statistic $z$ is negative, which matters for a one-sided $H_a: p_1>p_2$ (the p-value would then be large, not small).
在检验中用未合并的标准误,或在区间中用合并的标准误,都是常见失误。另一个是顺序颠倒:若 $\hat{p}_1<\hat{p}_2$,则统计量 $z$ 为负,这对单侧的 $H_a: p_1>p_2$ 很关键(此时 p 值会很大,而不是很小)。
Worked Example: a complete two-sided test, checked against an interval例题:完整的双侧检验,并与区间对照
A city council wants to know whether support for a bond measure differs between two neighborhoods. Independent random samples give 54 supporters among 120 residents of Neighborhood 1 and 35 among 100 residents of Neighborhood 2. Test at $\alpha=0.05$.
- State. $p_1$, $p_2$ = the true proportions of all residents of Neighborhoods 1 and 2 who support the measure. $H_0: p_1=p_2$, $H_a: p_1\ne p_2$.
- Plan. Two-proportion $z$-test. Independent random samples, each under 10% of its neighborhood. Pooled $\hat{p}_c=\dfrac{54+35}{220}\approx 0.4045$; expected counts $48.5$, $71.5$, $40.5$, $59.5$ are all at least 10.
- Do. $\hat{p}_1=0.45$, $\hat{p}_2=0.35$. Standard error $=\sqrt{0.4045(0.5955)\left(\tfrac{1}{120}+\tfrac{1}{100}\right)}\approx 0.0665$, so $z=\dfrac{0.45-0.35}{0.0665}\approx 1.50$ and the two-sided p-value is $2(0.0662)\approx 0.132$.
- Conclude. Because $0.132>0.05$, we fail to reject $H_0$. There is not convincing evidence that the true proportions of supporters differ between the two neighborhoods. This does not show that they are equal.
- Cross-check. The unpooled 95% interval is $0.10\pm 1.960(0.0659)$, i.e. $(-0.029,\,0.229)$. It contains 0, which agrees with the test; the test uses the pooled standard error and the interval does not, so the two methods agree here but are not identical in every borderline case.
市议会想知道两个社区对一项债券议案的支持率是否不同。独立随机样本显示:社区 1 的 120 名居民中有 54 人支持,社区 2 的 100 名居民中有 35 人支持。取 $\alpha=0.05$ 检验。
- State。$p_1$、$p_2$ 分别是社区 1 与社区 2 全体居民中支持该议案的真实比例。$H_0: p_1=p_2$,$H_a: p_1\ne p_2$。
- Plan。两比例 $z$ 检验。独立随机样本,各自不到本社区居民的 10%。合并比例 $\hat{p}_c=\dfrac{54+35}{220}\approx 0.4045$;预期计数 $48.5$、$71.5$、$40.5$、$59.5$ 都至少为 10。
- Do。$\hat{p}_1=0.45$,$\hat{p}_2=0.35$。标准误 $=\sqrt{0.4045(0.5955)\left(\tfrac{1}{120}+\tfrac{1}{100}\right)}\approx 0.0665$,所以 $z=\dfrac{0.45-0.35}{0.0665}\approx 1.50$,双侧 p 值为 $2(0.0662)\approx 0.132$。
- Conclude。因为 $0.132>0.05$,不拒绝 $H_0$。没有令人信服的证据表明两个社区的真实支持比例不同。这并不说明它们相等。
- 对照。未合并的 95% 区间为 $0.10\pm 1.960(0.0659)$,即 $(-0.029,\,0.229)$,含 0,与检验一致;检验用合并标准误而区间不用,所以这里两者一致,但并非在每个临界情形都完全相同。
Present the work as State, Plan, Do, Conclude. In the conclusion, tie the decision to the p-value and $\alpha$, name both groups and the variable, and match the strength of the claim to the design: "caused" only after random assignment, "differ in the populations" only after random sampling.
按 State、Plan、Do、Conclude 呈现解答。在结论中,把决定与 p 值和 $\alpha$ 挂钩,点明两组和变量,并让声称的强度与设计相匹配:只有随机分配后才说“导致”,只有随机抽样后才说“总体中不同”。
Prompt. A random sample of 250 households in Town R includes 160 that sort food scraps for composting; an independent random sample of 300 households in Town S includes 156. Is there convincing evidence that the proportions of all households that compost differ between the two towns? Use $\alpha=0.05$. (a) State the hypotheses. (b) Check the conditions and name the procedure. (c) Find the test statistic and p-value. (d) Conclude in context. (Illustrative data.)
| Part | What a complete answer states |
|---|---|
| (a) | $p_1$ and $p_2$ are the proportions of all households in Town R and Town S that compost; differences are always taken as R minus S. $H_0: p_1=p_2$; $H_a: p_1\ne p_2$. |
| (b) | Two-proportion $z$ test. The samples are independent random samples, and each is under 10% of the households in its town (sampling without replacement). Pooled proportion $\hat{p}_c=\dfrac{160+156}{250+300}=\dfrac{316}{550}\approx 0.5745$. Expected counts under $H_0$: $250(0.5745)\approx 143.6$, $250(0.4255)\approx 106.4$, $300(0.5745)\approx 172.4$, $300(0.4255)\approx 127.6$, all at least 10. (A test checks the pooled counts; an interval would check each group's own counts.) |
| (c) | $\hat{p}_1=0.64$, $\hat{p}_2=0.52$, difference (R minus S) $=0.12$. $z=\dfrac{0.12}{\sqrt{0.5745(1-0.5745)\left(\dfrac{1}{250}+\dfrac{1}{300}\right)}}=\dfrac{0.12}{0.0423}\approx 2.83$. Two-sided p-value $\approx 0.0046$ (2-PropZTest, $p_1\ne p_2$). |
| (d) | Since $0.0046<0.05$, reject $H_0$. There is convincing evidence that the proportions of all households that compost differ between Town R and Town S; the sample proportions suggest that Town R is higher. Random sampling lets us generalize to the households of the two towns; this is not an experiment, so we do not claim that the town causes the difference. |
题目。R 镇随机抽取 250 户家庭,其中 160 户对厨余进行堆肥分类;独立地从 S 镇随机抽取 300 户,其中 156 户。是否有令人信服的证据表明两镇全部家庭堆肥的比例不同?取 $\alpha=0.05$。(a) 陈述假设。(b) 检验条件并写出程序名称。(c) 求检验统计量与 p 值。(d) 结合情境作结论。(示意数据。)
| 部分 | 完整答案要点 |
|---|---|
| (a) | $p_1$、$p_2$ 分别是 R 镇和 S 镇全部家庭中堆肥的比例;差始终按 R 减 S 计算。$H_0: p_1=p_2$;$H_a: p_1\ne p_2$。 |
| (b) | 两比例 $z$ 检验。两个样本是独立随机样本,各自不到本镇家庭数的 10%(不放回抽样)。合并比例 $\hat{p}_c=\dfrac{160+156}{250+300}=\dfrac{316}{550}\approx 0.5745$。$H_0$ 下的预期计数:$250(0.5745)\approx 143.6$、$250(0.4255)\approx 106.4$、$300(0.5745)\approx 172.4$、$300(0.4255)\approx 127.6$,全都至少为 10。(检验检查合并后的计数;区间则检查每组各自的计数。) |
| (c) | $\hat{p}_1=0.64$,$\hat{p}_2=0.52$,差(R 减 S)$=0.12$。$z=\dfrac{0.12}{\sqrt{0.5745(1-0.5745)\left(\dfrac{1}{250}+\dfrac{1}{300}\right)}}=\dfrac{0.12}{0.0423}\approx 2.83$。双侧 p 值 $\approx 0.0046$(2-PropZTest,$p_1\ne p_2$)。 |
| (d) | 因为 $0.0046<0.05$,拒绝 $H_0$。有令人信服的证据表明 R 镇与 S 镇全部家庭堆肥的比例不同;样本比例显示 R 镇更高。随机抽样使结论可推广到两镇的家庭;这不是实验,所以不声称“所在城镇导致了差异”。 |
Group 1: 45 of 90 successes; group 2: 30 of 80. Find the pooled proportion and the $z$ statistic for $H_0: p_1=p_2$.第 1 组:90 人中 45 个成功;第 2 组:80 人中 30 个。求合并比例以及 $H_0: p_1=p_2$ 的 $z$ 统计量。
$\hat{p}_c=75/170\approx 0.4412$; $\hat{p}_1-\hat{p}_2=0.5-0.375=0.125$; standard error $=\sqrt{0.4412(0.5588)\left(\tfrac{1}{90}+\tfrac{1}{80}\right)}\approx 0.0763$; $z\approx 1.64$.
$\hat{p}_c=75/170\approx 0.4412$;$\hat{p}_1-\hat{p}_2=0.5-0.375=0.125$;标准误 $=\sqrt{0.4412(0.5588)\left(\tfrac{1}{90}+\tfrac{1}{80}\right)}\approx 0.0763$;$z\approx 1.64$。
A two-sided two-proportion test gives p-value $0.012$ at $\alpha=0.05$ for comparing adults who exercise weekly in two cities (independent random samples). Write the conclusion.对两个城市每周锻炼的成年人比例(独立随机样本)作双侧两比例检验,$\alpha=0.05$ 时 p 值为 $0.012$。写出结论。
Because $0.012<0.05$, we reject $H_0$. There is convincing evidence that the proportions of all adults who exercise weekly differ between the two cities.
因为 $0.012<0.05$,我们拒绝 $H_0$。有令人信服的证据表明两个城市每周锻炼的成年人比例不同。
Why can a randomized experiment support the word "caused" while a comparison of two random samples cannot?为什么随机化实验可以用“导致”这个词,而两个随机样本的比较不行?
Random assignment makes the groups comparable apart from the treatment, so a difference larger than chance is attributed to the treatment. Two random samples are observational, so confounding variables remain possible.
随机分配使两组除处理外具有可比性,所以超出机会的差异可归因于处理。两个随机样本属于观察性质,仍可能存在混杂变量。
Confidence Interval for the Difference of Two Population Means两个总体均值之差的置信区间
- Construct a two-sample $t$ interval for $\mu_1-\mu_2$ by hand and with
2-SampTInt. - State and check the conditions for two independent groups.
- Use the calculator's degrees of freedom and explain the conservative alternative.
- Distinguish a two-sample design from paired data.
- Interpret an interval for a difference of means in context.
- 手算并用
2-SampTInt构造 $\mu_1-\mu_2$ 的双样本 $t$ 区间。 - 陈述并检验两个独立组的条件。
- 使用计算器给出的自由度,并解释保守的替代做法。
- 区分双样本设计与配对数据。
- 结合情境解释均值之差的区间。
To compare two populations (or two treatments), estimate the difference $\mu_1-\mu_2$ using the difference of the sample means $\bar{x}_1-\bar{x}_2$. The standard error of this difference combines the variation in both groups, and the interval is the two-sample t-interval:
比较两个总体(或两种处理)时,用样本均值之差 $\bar{x}_1-\bar{x}_2$ 估计 $\mu_1-\mu_2$。该差的标准误综合了两组的变异,区间称为双样本 t 区间(two-sample t-interval):
$$(\bar{x}_1-\bar{x}_2)\pm t^*\sqrt{\dfrac{s_1^2}{n_1}+\dfrac{s_2^2}{n_2}}$$ Use the unpooled standard error. The degrees of freedom come from the calculator (STAT → TESTS → 0:2-SampTInt, with Pooled: No); a safe by-hand choice is the smaller of $n_1-1$ and $n_2-1$, which gives a slightly wider interval.
$$(\bar{x}_1-\bar{x}_2)\pm t^*\sqrt{\dfrac{s_1^2}{n_1}+\dfrac{s_2^2}{n_2}}$$ 使用非合并(unpooled)标准误。自由度由计算器给出(STAT → TESTS → 0:2-SampTInt,选 Pooled: No);手算时稳妥的选择是 $n_1-1$ 与 $n_2-1$ 中较小者,得到的区间略宽。
Conditions: independent groups, each sample条件:独立的组,每个样本
The groups must be independent: knowing the values in one group tells you nothing about the other. Random: the data come from two independent random samples, or from a randomized experiment with units randomly assigned to two treatments. 10% condition: for random samples, each sample is less than 10% of its own population (not needed for randomized experiments). Normal or large sample: check each sample or group separately: approximately normal population, or $n\ge 30$ in each group, or a graph of each group with no strong skew and no outliers. Both samples must meet the condition.
两组必须独立(independent):知道一组的数值,对另一组毫无信息。随机:数据来自两个独立的随机样本,或来自把单位随机分配到两种处理的随机化实验。10% 条件:对随机样本,每个样本都少于各自总体的 10%(随机化实验不需要)。正态或大样本:对每个样本或每组分别检验:总体近似正态,或每组 $n\ge 30$,或每组的图形没有明显偏斜和离群点。两个样本(both samples)都必须满足条件。
Two samples or paired data?双样本还是配对数据?
Before using this interval, decide how the data were collected. In a two-sample design the groups are separate collections of different individuals; no value in one group is linked to a value in the other. In paired (matched pairs) data, every value in one set is naturally linked to exactly one value in the other: the same subject measured twice, twins, or two matched individuals. Paired data are analyzed as one sample of differences (Topic 10.8). Using the two-sample formula on paired data ignores the pairing and usually wastes power.
使用该区间之前,先判断数据是如何收集的。双样本设计中,两组是不同个体的独立集合;一组中的任何数值都与另一组无关联。配对(paired,匹配对)数据中,一组的每个数值都自然地与另一组的恰好一个数值相连:同一对象测两次、双胞胎,或两个匹配的个体。配对数据按一个差值样本分析(主题 10.8)。对配对数据使用双样本公式会忽略配对关系,通常浪费检验功效。
Worked Example 7.6a: a 95% interval for two schools' commute times例题 7.6a:两所学校通勤时间的 95% 区间
Independent random samples of students from two large schools give commute times (minutes): School 1, $n_1=40$, $\bar{x}_1=32.5$, $s_1=9.8$; School 2, $n_2=35$, $\bar{x}_2=28.1$, $s_2=8.4$. Both dotplots are roughly symmetric with no outliers (and $n\ge 30$ in each). Find a 95% interval for $\mu_1-\mu_2$.
- Parameters: $\mu_1$ and $\mu_2$ are the true mean commute times (minutes) of all students at School 1 and School 2.
- Conditions: two independent random samples; each is under 10% of its school; each $n\ge 30$ and no strong skew or outliers.
- Standard error: $\sqrt{\dfrac{9.8^2}{40}+\dfrac{8.4^2}{35}}=\sqrt{2.401+2.016}=2.102$.
- Critical value: the calculator gives $df\approx 73.0$, so $t^*=1.993$. (By hand, $df=\min(39,34)=34$ gives $t^*=2.032$ and $(0.13,\,8.67)$, only slightly wider.)
- Interval: $(32.5-28.1)\pm 1.993(2.102)=4.40\pm 4.19$, i.e. $(0.21,\,8.59)$ minutes (
2-SampTInt,Stats,Pooled: No). - In context: we are 95% confident that the true mean commute time of students at School 1 is between 0.21 and 8.59 minutes longer than at School 2.
从两所大型学校各独立随机抽取学生,通勤时间(分钟)为:学校 1,$n_1=40$,$\bar{x}_1=32.5$,$s_1=9.8$;学校 2,$n_2=35$,$\bar{x}_2=28.1$,$s_2=8.4$。两组点图都大致对称、无离群点(且每组 $n\ge 30$)。求 $\mu_1-\mu_2$ 的 95% 区间。
- 参数:$\mu_1$、$\mu_2$ 分别是学校 1 与学校 2 全体学生的真实平均通勤时间(分钟)。
- 条件:两个独立随机样本;每个都少于各自学校的 10%;每组 $n\ge 30$ 且无明显偏斜或离群点。
- 标准误:$\sqrt{\dfrac{9.8^2}{40}+\dfrac{8.4^2}{35}}=\sqrt{2.401+2.016}=2.102$。
- 临界值:计算器给出 $df\approx 73.0$,所以 $t^*=1.993$。(手算取 $df=\min(39,34)=34$,得 $t^*=2.032$ 与 $(0.13,\,8.67)$,只略宽一点。)
- 区间:$(32.5-28.1)\pm 1.993(2.102)=4.40\pm 4.19$,即 $(0.21,\,8.59)$ 分钟(
2-SampTInt、Stats、Pooled: No)。 - 结合情境:我们有 95% 的把握认为,学校 1 学生的真实平均通勤时间比学校 2 长 0.21 至 8.59 分钟。
Worked Example 7.6b: an interval from a randomized experiment例题 7.6b:来自随机化实验的区间
Thirty volunteers are randomly assigned, 15 each, to prepare for a quiz by taking practice tests (Group 1) or by reviewing flashcards (Group 2). Quiz scores: Group 1, $\bar{x}_1=84.9$, $s_1=7.2$; Group 2, $\bar{x}_2=78.4$, $s_2=8.1$. Dotplots of each group are roughly symmetric with no outliers. Find a 95% interval for $\mu_1-\mu_2$.
- Parameters: $\mu_1$, $\mu_2$ are the true mean scores (points) that volunteers like these would score after practice tests and after flashcards.
- Conditions: random assignment (the volunteers are not a random sample, and the 10% condition is not needed); each group has $n=15<30$ but a roughly symmetric graph with no outliers.
- Standard error: $\sqrt{\dfrac{7.2^2}{15}+\dfrac{8.1^2}{15}}=2.798$; the calculator reports $df\approx 27.6$ and $t^*=2.050$.
- Interval: $6.50\pm 2.050(2.798)=6.50\pm 5.74$, i.e. $(0.76,\,12.24)$ points.
- In context: we are 95% confident that, for volunteers like these, the mean quiz score after practice tests is between 0.76 and 12.24 points higher than after flashcards. Because treatments were randomly assigned, a cause-and-effect conclusion about these volunteers is justified; the conclusion does not extend to all students.
30 名志愿者被随机分成两组,每组 15 人,分别用练习测验(组 1)或复习闪卡(组 2)准备一次测验。成绩:组 1,$\bar{x}_1=84.9$,$s_1=7.2$;组 2,$\bar{x}_2=78.4$,$s_2=8.1$。每组点图大致对称、无离群点。求 $\mu_1-\mu_2$ 的 95% 区间。
- 参数:$\mu_1$、$\mu_2$ 是与这些志愿者相似的人在做练习测验后与复习闪卡后的真实平均成绩(分)。
- 条件:随机分配(志愿者不是随机样本,不需要 10% 条件);每组 $n=15<30$,但图形大致对称且无离群点。
- 标准误:$\sqrt{\dfrac{7.2^2}{15}+\dfrac{8.1^2}{15}}=2.798$;计算器给出 $df\approx 27.6$,$t^*=2.050$。
- 区间:$6.50\pm 2.050(2.798)=6.50\pm 5.74$,即 $(0.76,\,12.24)$ 分。
- 结合情境:我们有 95% 的把握认为,对与这些志愿者相似的人,做练习测验后的平均成绩比复习闪卡后高 0.76 至 12.24 分。由于处理是随机分配的,可以对这些志愿者得出因果结论;结论不能推广到所有学生。
Worked Example: a small-sample experiment, the calculator df, and testing a stated value例题:小样本实验、计算器的自由度,以及检验一个给定的值
Twenty-two volunteers are randomly assigned to a no-screens bedtime routine (Group 1, $n_1=12$) or their usual routine (Group 2, $n_2=10$). Hours slept: Group 1, $\bar{x}_1=7.5$, $s_1=0.9$; Group 2, $\bar{x}_2=6.6$, $s_2=1.2$. Each dotplot is roughly symmetric with no outliers. Find a 90% interval for $\mu_1-\mu_2$, then decide whether a gain of a full hour is plausible.
- Parameters and conditions. $\mu_1$, $\mu_2$ are the true mean hours slept by volunteers like these with each routine. Random assignment, so independence comes from the design. Each $n<30$, so the dotplots must show no strong skew or outliers, and they do not.
- Standard error. $\sqrt{\dfrac{0.9^2}{12}+\dfrac{1.2^2}{10}}=\sqrt{0.0675+0.144}\approx 0.4599$.
- Degrees of freedom. The calculator reports $df\approx 16.46$ and $t^*=1.743$, so the margin of error is $1.743(0.4599)\approx 0.802$.
- Interval. $(7.5-6.6)\pm 0.802=0.90\pm 0.80$, i.e. $(0.10,\,1.70)$ hours (
2-SampTInt,Pooled: No). By hand, $df=\min(11,9)=9$ gives $t^*=1.833$ and $(0.06,\,1.74)$, slightly wider. - In context. We are 90% confident that the true mean sleep with the no-screens routine is between 0.10 and 1.70 hours longer than with the usual routine, for volunteers like these.
- Testing a stated value. A gain of exactly 1 hour lies inside $(0.10,\,1.70)$, so it is plausible, and so is a gain of only a few minutes. The data do not settle the size of the effect. Because the interval excludes 0, a two-sided test of $H_0: \mu_1=\mu_2$ at $\alpha=0.10$ would reject $H_0$.
22 名志愿者被随机分配到无屏幕睡前流程(组 1,$n_1=12$)或平常流程(组 2,$n_2=10$)。睡眠时长(小时):组 1,$\bar{x}_1=7.5$,$s_1=0.9$;组 2,$\bar{x}_2=6.6$,$s_2=1.2$。每组点图大致对称、无离群点。求 $\mu_1-\mu_2$ 的 90% 区间,并判断多睡整整一小时是否合理。
- 参数与条件。$\mu_1$、$\mu_2$ 是与这些志愿者相似的人在两种流程下的真实平均睡眠小时数。随机分配,所以独立性来自设计。每组 $n<30$,因此点图必须没有明显偏斜或离群点,而图确实如此。
- 标准误。$\sqrt{\dfrac{0.9^2}{12}+\dfrac{1.2^2}{10}}=\sqrt{0.0675+0.144}\approx 0.4599$。
- 自由度。计算器给出 $df\approx 16.46$,$t^*=1.743$,所以误差范围为 $1.743(0.4599)\approx 0.802$。
- 区间。$(7.5-6.6)\pm 0.802=0.90\pm 0.80$,即 $(0.10,\,1.70)$ 小时(
2-SampTInt、Pooled: No)。手算取 $df=\min(11,9)=9$,得 $t^*=1.833$ 与 $(0.06,\,1.74)$,略宽一点。 - 结合情境。我们有 90% 的把握认为,对与这些志愿者相似的人,无屏幕流程下的真实平均睡眠时间比平常流程长 0.10 至 1.70 小时。
- 检验一个给定的值。整整 1 小时的增幅在 $(0.10,\,1.70)$ 之内,所以是合理的,仅增加几分钟也是合理的。数据并没有确定效应的大小。因为区间不含 0,在 $\alpha=0.10$ 下对 $H_0: \mu_1=\mu_2$ 的双侧检验会拒绝 $H_0$。
Define $\mu_1$ and $\mu_2$ in words, say which group is group 1, and interpret the interval as a difference in that order ("the mean for group 1 is __ to __ higher/lower than the mean for group 2"). Check the Normal condition for each group, and state independence (two samples) or random assignment (experiment).
用文字定义 $\mu_1$ 与 $\mu_2$,说明谁是第 1 组,并按该顺序解释差(“第 1 组的均值比第 2 组高/低 __ 至 __”)。对每个组检验正态条件,并说明独立性(双样本)或随机分配(实验)。
- Pooling the standard deviations (
Pooled: Yes) by default. - Adding $s_1$ and $s_2$ instead of combining $\dfrac{s_1^2}{n_1}$ and $\dfrac{s_2^2}{n_2}$.
- Checking Normality only for the larger group.
- 默认合并标准差(
Pooled: Yes)。 - 把 $s_1$ 与 $s_2$ 直接相加,而不是合并 $\dfrac{s_1^2}{n_1}$ 与 $\dfrac{s_2^2}{n_2}$。
- 只对较大的组检验正态性。
Twenty students each take a test with a pen and later a similar test with a laptop, and scores are compared. Is a two-sample interval appropriate?20 名学生各自先用笔后用笔记本电脑做相似测验,并比较成绩。适合用双样本区间吗?
No. Each student gives two linked measurements, so these are paired data; analyze the 20 differences with a one-sample $t$ interval.
不适合。每名学生给出两个相关联的测量,因此是配对数据;应对 20 个差值做单样本 $t$ 区间。
Two independent samples have $\bar{x}_1=50$, $\bar{x}_2=46$, standard error 1.5 and $t^*=2.0$. Find the interval for $\mu_1-\mu_2$.两个独立样本 $\bar{x}_1=50$、$\bar{x}_2=46$,标准误 1.5,$t^*=2.0$。求 $\mu_1-\mu_2$ 的区间。
$(50-46)\pm 2.0(1.5)=4\pm 3.0$, i.e. $(1.0,\,7.0)$.
$(50-46)\pm 2.0(1.5)=4\pm 3.0$,即 $(1.0,\,7.0)$。
Why is the 10% condition not required in a randomized experiment with volunteers?为什么有志愿者的随机化实验不需要 10% 条件?
The 10% condition protects independence when sampling without replacement from a population. In a randomized experiment, independence comes from random assignment, not from sampling a fraction of a population.
10% 条件保护的是从总体不放回抽样时的独立性。随机化实验的独立性来自随机分配,而不是从总体中抽取一部分。
Justifying a Claim About the Difference of Two Population Means Based on a Confidence Interval利用置信区间论证关于两个总体均值之差的说法
- Use an interval for $\mu_1-\mu_2$ to justify a claim about a difference in means.
- Decide from the interval whether 0 is a plausible value for the difference.
- Describe the direction and likely size of a difference using the whole interval.
- Match a confidence level to a two-sided significance level.
- 用 $\mu_1-\mu_2$ 的区间论证关于均值差异的说法。
- 根据区间判断 0 是否为差的合理取值。
- 利用整个区间描述差异的方向与可能的大小。
- 把置信水平与双侧显著性水平对应起来。
If there were no difference between two population means, $\mu_1-\mu_2$ would equal 0. So, to evaluate a claim about a difference in means, look at where 0 falls relative to the confidence interval for $\mu_1-\mu_2$ (Figure 7.4). If the interval contains 0, then 0 is a plausible value for the difference: the data do not provide convincing evidence that the means differ. If the interval does not contain 0, the interval is entirely positive or entirely negative, and you can justify the claim that the means differ, in the direction the interval shows.
如果两个总体均值没有差异,则 $\mu_1-\mu_2$ 等于 0。因此要评价关于均值差异(difference)的说法,就看 0 相对于 $\mu_1-\mu_2$ 置信区间的位置(图 7.4)。若区间包含 0(contains 0),则 0 是差的合理取值:数据没有提供令人信服的证据表明均值不同。若区间不包含 0,则区间全为正或全为负,可以论证(justify)均值不同的说法,其方向由区间显示。
The interval also tells you how large the difference might be, something a test alone does not. An interval such as $(0.21,\,8.59)$ minutes excludes zero but includes tiny differences; whether the difference matters in practice is a judgment about context. Remember that the interval concerns the populations (or treatments) as defined by the design: a randomized experiment supports a causal claim for the units studied, a random sample supports generalization to its population, and an observational comparison supports only association.
区间还告诉你差异可能有多大,这是单独的检验给不了的。像 $(0.21,\,8.59)$ 分钟这样的区间不含零,但包含很小的差异;差异在实际中是否重要,要结合情境判断。记住区间针对的是设计所界定的总体(或处理):随机化实验支持对所研究单位的因果结论,随机样本支持推广到其总体,而观察性比较只支持关联。
Worked Example 7.7a: commute times: zero is not plausible例题 7.7a:通勤时间:0 不合理
Use the 95% interval $(0.21,\,8.59)$ minutes for $\mu_1-\mu_2$ from Worked Example 7.6a to evaluate the claim that the two schools have the same mean commute time.
- Compare with 0: the interval does not contain 0; it is entirely positive.
- Conclusion: there is convincing evidence that the mean commute times differ, and School 1 has the longer mean commute.
- Size: the difference is plausibly anywhere from about 0.21 to 8.59 minutes, so it might be tiny.
用例题 7.6a 中 $\mu_1-\mu_2$ 的 95% 区间 $(0.21,\,8.59)$ 分钟,评价两所学校平均通勤时间相同的说法。
- 与 0 比较:区间不包含 0;全为正。
- 结论:有令人信服的证据表明平均通勤时间不同,且学校 1 的平均通勤更长。
- 大小:差异合理地处于约 0.21 至 8.59 分钟之间,所以可能很小。
Worked Example 7.7b: tomato yields: zero is plausible例题 7.7b:番茄产量:0 合理
Researchers grow Variety 1 on 20 randomly assigned plots and Variety 2 on 18 randomly assigned plots. Yields per plant (kg): Variety 1, $\bar{x}_1=3.9$, $s_1=0.8$; Variety 2, $\bar{x}_2=3.6$, $s_2=0.9$. Graphs of each group show no strong skew or outliers. A grower claims Variety 1 has the higher mean yield. Does a 95% interval justify the claim?
- Standard error: $\sqrt{\dfrac{0.8^2}{20}+\dfrac{0.9^2}{18}}=0.277$; the calculator gives $df\approx 34.3$, $t^*=2.032$.
- Interval: $0.30\pm 2.032(0.277)=0.30\pm 0.56$, i.e. $(-0.26,\,0.86)$ kg.
- Compare with 0: the interval contains 0 (it runs from negative to positive).
- In context: 0 is a plausible value of $\mu_1-\mu_2$, so the data do not provide convincing evidence of a difference in mean yield per plant between the varieties; the claim is not justified by this study.
研究者把品种 1 种在 20 块随机分配的地块上,品种 2 种在 18 块随机分配的地块上。单株产量(千克):品种 1,$\bar{x}_1=3.9$,$s_1=0.8$;品种 2,$\bar{x}_2=3.6$,$s_2=0.9$。每组图形无明显偏斜或离群点。种植户声称品种 1 的平均产量更高。95% 区间能论证这一说法吗?
- 标准误:$\sqrt{\dfrac{0.8^2}{20}+\dfrac{0.9^2}{18}}=0.277$;计算器给出 $df\approx 34.3$,$t^*=2.032$。
- 区间:$0.30\pm 2.032(0.277)=0.30\pm 0.56$,即 $(-0.26,\,0.86)$ 千克。
- 与 0 比较:区间包含 0(从负数延伸到正数)。
- 结合情境:0 是 $\mu_1-\mu_2$ 的合理取值,所以数据没有提供令人信服的证据表明两品种的单株平均产量不同;这项研究不能论证该说法。
The key sentence is: "The interval contains 0 (or does not contain 0), so ..." followed by a conclusion about the difference in the means in context. Use "plausible" and "convincing evidence" language. If the interval includes only positive values, say which mean is larger.
关键句是:“区间包含 0(或不包含 0),所以……”,然后结合情境对均值之差作结论。使用“合理”和“令人信服的证据”的措辞。若区间全为正,要说明哪个均值较大。
Concluding "the means are equal" because the interval contains 0. The interval contains many other differences; the correct conclusion is that the data do not provide convincing evidence of a difference.
因为区间包含 0 就得出“均值相等”。区间还包含许多其他差值;正确结论是数据没有提供令人信服的证据表明有差异。
A 95% interval for $\mu_1-\mu_2$ is $(-2.4,\,5.9)$. Is there convincing evidence that the means differ?$\mu_1-\mu_2$ 的 95% 区间是 $(-2.4,\,5.9)$。有令人信服的证据表明均值不同吗?
No. The interval contains 0, so no difference is a plausible value; the data do not provide convincing evidence that the means differ.
没有。区间包含 0,所以无差异是合理取值;数据没有提供令人信服的证据表明均值不同。
A 90% interval for $\mu_A-\mu_B$ is $(1.2,\,6.8)$. Which mean appears larger, and is zero plausible?$\mu_A-\mu_B$ 的 90% 区间是 $(1.2,\,6.8)$。哪个均值看来更大?0 合理吗?
$\mu_A$ appears larger because every value in the interval is positive. Zero is not plausible, so there is convincing evidence that the means differ.
$\mu_A$ 看来更大,因为区间内每个值都为正。0 不合理,所以有令人信服的证据表明均值不同。
A 95% interval for the difference is $(0.3,\,0.9)$ points on a 100-point exam. Convincing evidence of a difference? Is it necessarily important?在 100 分制考试中,差的 95% 区间是 $(0.3,\,0.9)$ 分。有令人信服的证据表明有差异吗?一定重要吗?
Yes, the interval excludes 0, so there is convincing evidence of a difference. But the plausible differences are under one point, which may be too small to matter in practice.
有,区间不含 0,所以有令人信服的证据表明有差异。但合理的差异不到一分,在实际中可能小到不重要。
Setting Up a Test for the Difference of Two Population Means建立两个总体均值之差的检验
- Define $\mu_1$ and $\mu_2$ in context and decide which group is group 1.
- Write $H_0:\mu_1=\mu_2$ (equivalently $\mu_1-\mu_2=0$) with the correct alternative hypothesis.
- Choose a one-sided or two-sided alternative from the wording of the question.
- Set up the hypotheses for paired data in terms of the mean difference $\mu_d$.
- 在情境中定义 $\mu_1$ 与 $\mu_2$,并确定谁是第 1 组。
- 写出 $H_0:\mu_1=\mu_2$(等价于 $\mu_1-\mu_2=0$)及正确的备择假设。
- 根据题意选择单侧或双侧备择假设。
- 用平均差值 $\mu_d$ 为配对数据建立假设。
A test comparing two means asks whether the sample data provide convincing evidence of a difference. The null hypothesis says there is no difference between the population means, and the alternative hypothesis says there is a difference (in one direction or either):
比较两个均值的检验询问样本数据是否提供了令人信服的差异证据。零假设说两个总体均值没有差异,备择假设(alternative hypothesis)说存在差异(某一方向或任一方向):
$H_0:\mu_1=\mu_2$ (that is, $\mu_1-\mu_2=0$) against $H_a:\mu_1<\mu_2$, $H_a:\mu_1>\mu_2$, or $H_a:\mu_1\ne\mu_2$. Describe $\mu_1$ and $\mu_2$ as population means (or true treatment means) with units, and say which group is which. For paired data, use one parameter instead: $\mu_d$, the true mean of the differences; $H_0:\mu_d=0$.
$H_0:\mu_1=\mu_2$(即 $\mu_1-\mu_2=0$),对立面为 $H_a:\mu_1<\mu_2$、$H_a:\mu_1>\mu_2$ 或 $H_a:\mu_1\ne\mu_2$。把 $\mu_1$ 与 $\mu_2$ 描述为带单位的总体均值(或处理的真实均值),并说明谁是谁。配对数据则只用一个参数:$\mu_d$,差值的真实均值;$H_0:\mu_d=0$。
Choose the direction from the question's wording, and keep the order consistent: if $\mu_1$ is the new method and $\mu_2$ the old, "the new method gives higher scores" is $H_a:\mu_1>\mu_2$. Reversing the labels reverses the inequality. The conditions are those of Topic 10.5: independent random samples or randomized assignment, the 10% condition for samples, and Normality or large sample in each group.
根据题目措辞确定方向,并保持顺序一致:若 $\mu_1$ 是新方法、$\mu_2$ 是旧方法,“新方法得分更高”就是 $H_a:\mu_1>\mu_2$。交换标签会使不等号反向。条件与主题 10.5 相同:独立随机样本或随机分配、样本的 10% 条件,以及每组的正态性或大样本。
Worked Example 7.8a: two schools: is there any difference?例题 7.8a:两所学校:有差异吗?
A district official wonders whether the mean commute time differs between School 1 and School 2.
- Parameters: $\mu_1$ = true mean commute time (minutes) of all students at School 1; $\mu_2$ = the same for School 2.
- Null hypothesis: $H_0:\mu_1=\mu_2$ (equivalently $\mu_1-\mu_2=0$).
- Alternative hypothesis: "differs" is two-sided, $H_a:\mu_1\ne\mu_2$.
学区官员想知道学校 1 与学校 2 的平均通勤时间是否不同。
- 参数:$\mu_1$ = 学校 1 全体学生的真实平均通勤时间(分钟);$\mu_2$ = 学校 2 的相应值。
- 零假设:$H_0:\mu_1=\mu_2$(等价于 $\mu_1-\mu_2=0$)。
- 备择假设:“不同”是双侧的,$H_a:\mu_1\ne\mu_2$。
Worked Example 7.8b: an experiment with a directional claim例题 7.8b:有方向性说法的实验
In the study-methods experiment, the researchers expect practice tests to produce higher scores than flashcards.
- Parameters: $\mu_1$ = true mean quiz score (points) for volunteers like these after practice tests; $\mu_2$ = the true mean score after flashcards.
- Hypotheses: $H_0:\mu_1=\mu_2$; $H_a:\mu_1>\mu_2$ (practice tests give higher scores).
- Order matters: if the labels were swapped, the alternative would be written $H_a:\mu_1<\mu_2$ and mean the same thing.
在学习方法实验中,研究者预期练习测验比闪卡带来更高的成绩。
- 参数:$\mu_1$ = 与这些志愿者相似的人做练习测验后的真实平均成绩(分);$\mu_2$ = 复习闪卡后的真实平均成绩。
- 假设:$H_0:\mu_1=\mu_2$;$H_a:\mu_1>\mu_2$(练习测验成绩更高)。
- 顺序很重要:若交换标签,备择假设要写成 $H_a:\mu_1<\mu_2$,含义不变。
Worked Example 7.8c: hypotheses for paired data例题 7.8c:配对数据的假设
Ten students' typing times are measured before and after a training program. The coach wants to know if training reduces typing time.
- Parameter: define the difference for each student as $d=\text{before}-\text{after}$ (seconds). $\mu_d$ = the true mean of these differences for all students like these.
- Hypotheses: $H_0:\mu_d=0$; $H_a:\mu_d>0$ (before is longer than after, so training reduces time).
- Why one parameter: the data are paired, so the analysis is a one-sample test on the differences.
测量了 10 名学生训练前后的打字用时。教练想知道训练是否减少打字时间。
- 参数:把每名学生的差值定义为 $d=\text{before}-\text{after}$(秒)。$\mu_d$ = 全体类似学生这些差值的真实均值。
- 假设:$H_0:\mu_d=0$;$H_a:\mu_d>0$(训练前更长,即训练减少了用时)。
- 为什么只有一个参数:数据是配对的,所以分析是对差值做单样本检验。
Write "Let $\mu_1$ = ___ and $\mu_2$ = ___" with the group, variable and units for each. Then write $H_0:\mu_1=\mu_2$ and an $H_a$ that matches both the wording and the order of the labels. Keep $H_0$ free of $\bar{x}$ values and never write $\bar{x}_1=\bar{x}_2$.
写出“设 $\mu_1$ = ___,$\mu_2$ = ___”,并给出各自的组、变量与单位。然后写 $H_0:\mu_1=\mu_2$,以及与措辞和标签顺序都一致的 $H_a$。$H_0$ 中不出现 $\bar{x}$ 的数值,绝不写 $\bar{x}_1=\bar{x}_2$。
- Writing the hypotheses with sample means.
- Writing $H_a:\mu_1\ne\mu_2$ when the question says "greater".
- Using two parameters for paired data.
- 用样本均值写假设。
- 题目说“更大”时写 $H_a:\mu_1\ne\mu_2$。
- 对配对数据使用两个参数。
A company tests whether a new fertilizer yields taller plants than the standard one. Write the hypotheses (fertilizer = group 1).某公司检验新肥料是否比标准肥料使植株更高。写出假设(新肥料 = 第 1 组)。
$\mu_1$ and $\mu_2$ are the true mean plant heights (cm) with the new and standard fertilizers. $H_0:\mu_1=\mu_2$; $H_a:\mu_1>\mu_2$.
$\mu_1$、$\mu_2$ 分别是使用新肥料与标准肥料的真实平均株高(厘米)。$H_0:\mu_1=\mu_2$;$H_a:\mu_1>\mu_2$。
Rewrite $H_0:\mu_1=\mu_2$ as a statement about $\mu_1-\mu_2$.把 $H_0:\mu_1=\mu_2$ 改写成关于 $\mu_1-\mu_2$ 的陈述。
$H_0:\mu_1-\mu_2=0$.
$H_0:\mu_1-\mu_2=0$。
The same 15 runners are timed in two different shoes. Which parameter(s) do the hypotheses use?同样的 15 名跑者分别穿两种鞋计时。假设使用哪个(些)参数?
One parameter, $\mu_d$, the true mean difference in time between the two shoes for runners like these; $H_0:\mu_d=0$. The data are paired.
一个参数 $\mu_d$,即类似跑者穿两种鞋所用时间的真实平均差;$H_0:\mu_d=0$。数据是配对的。
Carrying Out a Test for the Difference of Two Population Means实施两个总体均值之差的检验
- Calculate the two-sample $t$ test statistic and use the calculator's
2-SampTTestoutput. - Find the p-value and write a conclusion in context.
- Recognize paired data and analyze the differences with a one-sample $t$ procedure.
- Explain why ignoring the pairing can change the conclusion.
- 计算双样本 $t$ 检验统计量,并使用计算器
2-SampTTest的输出。 - 求 p 值并结合情境写出结论。
- 识别配对数据,并用单样本 $t$ 程序分析差值。
- 解释忽略配对为何会改变结论。
$$t=\dfrac{(\bar{x}_1-\bar{x}_2)-0}{\sqrt{\dfrac{s_1^2}{n_1}+\dfrac{s_2^2}{n_2}}}$$ The degrees of freedom come from the calculator (by hand, the smaller of $n_1-1$ and $n_2-1$ is a safe, slightly conservative alternative). TI-84: STAT → TESTS → 4:2-SampTTest with Pooled: No; the output gives the test statistic $t$, the p-value, and $df$. Use the same four steps as in Topic 9.6.
$$t=\dfrac{(\bar{x}_1-\bar{x}_2)-0}{\sqrt{\dfrac{s_1^2}{n_1}+\dfrac{s_2^2}{n_2}}}$$ 自由度由计算器给出(手算时,取 $n_1-1$ 与 $n_2-1$ 中较小者是稳妥而略保守的替代做法)。TI-84:STAT → TESTS → 4:2-SampTTest,选 Pooled: No;输出给出检验统计量 $t$、p 值与 $df$。步骤与主题 9.6 相同的四步。
The two-sample t-test compares the observed difference of sample means with the value 0 that the null hypothesis predicts, in units of the standard error of the difference. The test statistic measures how many standard errors the difference is from 0. A p-value that is small means a difference this large would rarely occur by chance (or random assignment) if $\mu_1=\mu_2$. Conclusions use the same wording as Topic 9.6: compare the p-value with $\alpha$, then reject or fail to reject $H_0$ and state the evidence for $H_a$ in context.
双样本 t 检验(two-sample t-test)以差的标准误为单位,把观测到的样本均值之差与零假设预测的 0 比较。检验统计量(test statistic)衡量差值距离 0 有多少个标准误。p 值小说明若 $\mu_1=\mu_2$,如此大的差异很少会仅由机会(或随机分配)产生。结论的措辞与主题 9.6 相同:比较 p 值与 $\alpha$,然后拒绝或不拒绝(fail to reject)$H_0$,并结合情境陈述对 $H_a$ 的证据。
Worked Example 7.9a: two-sided test of two schools' commute times例题 7.9a:两所学校通勤时间的双侧检验
Test, at $\alpha=0.05$, whether the mean commute times differ, using the data in Worked Example 7.6a ($n_1=40$, $\bar{x}_1=32.5$, $s_1=9.8$; $n_2=35$, $\bar{x}_2=28.1$, $s_2=8.4$).
- State: $\mu_1$, $\mu_2$ are the true mean commute times (minutes) at School 1 and School 2. $H_0:\mu_1=\mu_2$; $H_a:\mu_1\ne\mu_2$.
- Plan: two-sample $t$ test for $\mu_1-\mu_2$. Independent random samples; each under 10% of its school; each $n\ge 30$.
- Do: $t=\dfrac{32.5-28.1}{\sqrt{\dfrac{9.8^2}{40}+\dfrac{8.4^2}{35}}}=\dfrac{4.40}{2.102}=2.09$, $df\approx 73.0$, p-value $\approx 0.0398$ (
2-SampTTest,Stats, $\mu_1\ne\mu_2$,Pooled: No). - Conclude: 0.0398 is less than $0.05$, so reject $H_0$. There is convincing evidence that the true mean commute times at the two schools differ.
Check: this matches Worked Example 7.7a, where the 95% interval was entirely positive.
用例题 7.6a 的数据($n_1=40$,$\bar{x}_1=32.5$,$s_1=9.8$;$n_2=35$,$\bar{x}_2=28.1$,$s_2=8.4$),在 $\alpha=0.05$ 下检验平均通勤时间是否不同。
- 陈述:$\mu_1$、$\mu_2$ 是学校 1 与学校 2 学生的真实平均通勤时间(分钟)。$H_0:\mu_1=\mu_2$;$H_a:\mu_1\ne\mu_2$。
- 计划:针对 $\mu_1-\mu_2$ 的双样本 $t$ 检验。独立随机样本;各少于所在学校的 10%;每组 $n\ge 30$。
- 计算:$t=\dfrac{32.5-28.1}{\sqrt{\dfrac{9.8^2}{40}+\dfrac{8.4^2}{35}}}=\dfrac{4.40}{2.102}=2.09$,$df\approx 73.0$,p 值 $\approx 0.0398$(
2-SampTTest、Stats、$\mu_1\ne\mu_2$、Pooled: No)。 - 结论:0.0398 小于 $0.05$,拒绝 $H_0$。有令人信服的证据表明两所学校的真实平均通勤时间不同。
核对:这与例题 7.7a 一致,那里的 95% 区间全为正。
Worked Example 7.9b: one-sided test in the study-methods experiment例题 7.9b:学习方法实验的单侧检验
Test, at $\alpha=0.05$, whether practice tests give a higher mean score than flashcards (data in Worked Example 7.6b: $n_1=n_2=15$, $\bar{x}_1=84.9$, $s_1=7.2$, $\bar{x}_2=78.4$, $s_2=8.1$).
- State: $H_0:\mu_1=\mu_2$; $H_a:\mu_1>\mu_2$, with $\mu_1$, $\mu_2$ the true mean scores after practice tests and flashcards for volunteers like these.
- Plan: two-sample $t$ test; random assignment of the 30 volunteers; each group is roughly symmetric with no outliers.
- Do: $t=\dfrac{6.50}{2.798}=2.32$, $df\approx 27.6$, one-sided p-value $\approx 0.0139$ (
2-SampTTestwith $\mu_1>\mu_2$). - Conclude: 0.0139 is less than $0.05$, so reject $H_0$. There is convincing evidence that, for volunteers like these, practice tests produce a higher mean quiz score than flashcards. Since the assignment was random, this is a cause-and-effect conclusion for such volunteers.
在 $\alpha=0.05$ 下检验练习测验的平均成绩是否高于闪卡(数据见例题 7.6b:$n_1=n_2=15$,$\bar{x}_1=84.9$,$s_1=7.2$,$\bar{x}_2=78.4$,$s_2=8.1$)。
- 陈述:$H_0:\mu_1=\mu_2$;$H_a:\mu_1>\mu_2$,其中 $\mu_1$、$\mu_2$ 是与这些志愿者相似的人做练习测验后与复习闪卡后的真实平均成绩。
- 计划:双样本 $t$ 检验;30 名志愿者随机分配;每组大致对称、无离群点。
- 计算:$t=\dfrac{6.50}{2.798}=2.32$,$df\approx 27.6$,单侧 p 值 $\approx 0.0139$(
2-SampTTest,选 $\mu_1>\mu_2$)。 - 结论:0.0139 小于 $0.05$,拒绝 $H_0$。有令人信服的证据表明,对与这些志愿者相似的人,练习测验使测验平均成绩高于闪卡。由于是随机分配,这是对此类志愿者的因果结论。
Paired data: a one-sample t test on the differences配对数据:对差值做单样本 t 检验
When the data are paired (matched pairs), compute the difference within each pair and treat the differences as a single sample. The parameter is $\mu_d$, the true mean of the differences. The inference is a one-sample $t$ procedure applied to the differences: $t=\dfrac{\bar{x}_d-0}{s_d/\sqrt{n}}$ with $df=n-1$, where $n$ is the number of pairs. Conditions apply to the differences: the pairs are a random sample (or the order or assignment within pairs was random), the number of pairs is under 10% of the population, and the differences are approximately normal or the number of pairs is at least 30. The mean of the differences equals the difference of the means, but the standard deviation $s_d$ is usually much smaller than the spread within either set, which makes the pairing pay off.
当数据是配对(matched pairs)时,先在每一对内计算差值,再把差值当作一个样本。参数是 $\mu_d$,差值的真实均值。推断是对差值(differences)使用单样本 $t$ 程序:$t=\dfrac{\bar{x}_d-0}{s_d/\sqrt{n}}$,$df=n-1$,其中 $n$ 是对数。条件针对差值:各对是随机样本(或对内的顺序或分配是随机的)、对数少于总体的 10%,且差值近似正态或对数至少为 30。差值的均值(mean difference)等于均值之差,但 $s_d$ 通常远小于任一组内的离散程度,这正是配对的好处。
Worked Example 7.9c: paired test of a typing-training program例题 7.9c:打字训练项目的配对检验
Ten randomly chosen students are timed typing the same paragraph before and after training. Before: 52, 47, 61, 55, 49, 58, 63, 50, 57, 54; after: 48, 45, 55, 53, 47, 52, 60, 49, 52, 52 (seconds). Test, at $\alpha=0.05$, whether training reduces the mean time. A dotplot of the differences shows no outliers or strong skew.
- State: $d=\text{before}-\text{after}$; $\mu_d$ = true mean reduction in typing time (seconds) for students like these. $H_0:\mu_d=0$; $H_a:\mu_d>0$.
- Differences: 4,2,6,2,2,6,3,1,5,2, so $\bar{x}_d=3.3$ and $s_d=1.829$.
- Plan: paired $t$ test (one-sample $t$ on the differences); random sample of students; 10 pairs is under 10% of a large student population; differences roughly symmetric, no outliers.
- Do: $t=\dfrac{3.3-0}{1.829/\sqrt{10}}=\dfrac{3.3}{0.578}=5.71$, $df=9$, p-value $\approx 0.0001$ (
T-TestonL3, $\mu_0=0$, $\mu>\mu_0$). - Conclude: the p-value is less than $0.05$, so reject $H_0$. There is convincing evidence that the mean typing time of students like these is reduced after training.
- Interval: a 95% interval for $\mu_d$ is $3.3\pm 2.262(0.578)=(1.99,\,4.61)$ seconds.
随机抽取 10 名学生,分别在训练前后计时打同一段文字。训练前:52、47、61、55、49、58、63、50、57、54;训练后:48、45、55、53、47、52、60、49、52、52(秒)。在 $\alpha=0.05$ 下检验训练是否减少平均用时。差值点图无离群点、无明显偏斜。
- 陈述:$d=\text{before}-\text{after}$;$\mu_d$ = 类似学生打字用时的真实平均减少量(秒)。$H_0:\mu_d=0$;$H_a:\mu_d>0$。
- 差值:4,2,6,2,2,6,3,1,5,2,所以 $\bar{x}_d=3.3$,$s_d=1.829$。
- 计划:配对 $t$ 检验(对差值做单样本 $t$);学生为随机样本;10 对少于大批学生总体的 10%;差值大致对称、无离群点。
- 计算:$t=\dfrac{3.3-0}{1.829/\sqrt{10}}=\dfrac{3.3}{0.578}=5.71$,$df=9$,p 值 $\approx 0.0001$(对
L3做T-Test,$\mu_0=0$,$\mu>\mu_0$)。 - 结论:p 值小于 $0.05$,拒绝 $H_0$。有令人信服的证据表明类似学生训练后的平均打字用时减少了。
- 区间:$\mu_d$ 的 95% 区间为 $3.3\pm 2.262(0.578)=(1.99,\,4.61)$ 秒。
Worked Example 7.9d: what goes wrong if you ignore the pairing例题 7.9d:忽略配对会出什么问题
Run the wrong test on the data in Worked Example 7.9c: treat "before" (mean 54.6, $s=5.23$) and "after" (mean 51.3, $s=4.32$) as two independent samples of 10.
- Two-sample statistic: $t=\dfrac{54.6-51.3}{\sqrt{\dfrac{5.23^2}{10}+\dfrac{4.32^2}{10}}}=1.54$, $df\approx 17.4$, p-value $\approx 0.071$ (one-sided, $H_a:\mu_{\text{before}}>\mu_{\text{after}}$; a two-sided p-value would be 0.142).
- Result: 0.071 is greater than $0.05$, so the incorrect procedure fails to reject $H_0$ and misses the effect.
- Why: students differ a lot in typing speed (the spread within each set is about 4 to 5 seconds), and that variation swamps the 3.3 second mean change. The paired test removes it, since each student is compared with himself or herself: $s_d=1.829$ only.
对例题 7.9c 的数据做错误的检验:把“训练前”(均值 54.6,$s=5.23$)与“训练后”(均值 51.3,$s=4.32$)当成两个各含 10 人的独立样本。
- 双样本统计量:$t=\dfrac{54.6-51.3}{\sqrt{\dfrac{5.23^2}{10}+\dfrac{4.32^2}{10}}}=1.54$,$df\approx 17.4$,p 值 $\approx 0.071$(单侧,$H_a:\mu_{\text{before}}>\mu_{\text{after}}$;双侧 p 值为 0.142)。
- 结果:0.071 大于 $0.05$,错误的程序不拒绝 $H_0$,错过了这一效应。
- 原因:学生之间的打字速度差别很大(每组内的离散程度约 4 到 5 秒),这一变异淹没了 3.3 秒的平均变化。配对检验消除了它,因为每名学生只与自己比较:$s_d=1.829$ 而已。
Show the test statistic, the degrees of freedom and the p-value, then conclude in context. For paired data, define the difference ("before minus after") and the direction of $H_a$ accordingly, and say the procedure is a paired $t$ test. A conclusion that only compares the two sample means, without saying how strong the evidence is, is incomplete.
写出检验统计量、自由度与 p 值,然后结合情境作结论。对配对数据,要定义差值(“训练前减训练后”)并据此确定 $H_a$ 的方向,同时说明程序是配对 $t$ 检验。只比较两个样本均值而不说明证据强度的结论是不完整的。
- Using a two-sample test on paired data (or the reverse).
- Reversing the sign of the differences relative to $H_a$.
- Checking Normality of the two original sets rather than of the differences.
- 对配对数据用双样本检验(或相反)。
- 差值的符号与 $H_a$ 相反。
- 检验的是两组原始数据的正态性,而不是差值的正态性。
Prompt. A laboratory trains 45 new technicians and randomly assigns 20 to Method A and 25 to Method B. Afterwards each technician processes samples for 40 minutes, and the number processed correctly is recorded. Method A: $n_1=20$, $\bar{x}_1=30.4$, $s_1=8$. Method B: $n_2=25$, $\bar{x}_2=25.4$, $s_2=6$. Dotplots of both groups are roughly symmetric with no outliers. Is there convincing evidence that the mean numbers processed correctly differ between the methods? Use $\alpha=0.05$. (a) State the hypotheses. (b) Check the conditions and name the procedure. (c) Find the test statistic and p-value. (d) Conclude in context. (Illustrative data.)
| Part | What a complete answer states |
|---|---|
| (a) | $\mu_1$ and $\mu_2$ are the true mean numbers of samples processed correctly by technicians like these after Method A and after Method B; differences are taken as A minus B. $H_0: \mu_1=\mu_2$; $H_a: \mu_1\ne\mu_2$. |
| (b) | Two-sample $t$ test for $\mu_1-\mu_2$. Technicians were randomly assigned to the methods, so the groups are independent (the 10% condition is not needed). Each group has $n<30$, but its dotplot is roughly symmetric with no outliers, so Normality is reasonable for both groups. |
| (c) | $SE=\sqrt{\dfrac{8^2}{20}+\dfrac{6^2}{25}}\approx 2.154$ and $t=\dfrac{30.4-25.4}{2.154}\approx 2.32$. Technology gives $df\approx 34.4$ and a two-sided p-value $\approx 0.0263$ (2-SampTTest, Pooled: No). By hand, $df=\min(20,25)-1=19$ gives p-value $\approx 0.0315$, which leads to the same decision. |
| (d) | Since $0.0263<0.05$, reject $H_0$. There is convincing evidence that the true mean number processed correctly differs between Method A and Method B for technicians like these; Method A is higher in the sample, by 5.0 samples on average. A 95% interval for $\mu_1-\mu_2$ is $5.0\pm 2.031(2.154)$, about $(0.62,\,9.38)$ samples, so the size of the advantage is not pinned down closely. |
| (e) | Random assignment supports a cause-and-effect conclusion about the method for these technicians; they were not randomly selected from all technicians, so the result is not generalized beyond technicians like these. |
题目。某实验室培训 45 名新技术员,随机分配 20 人用方法 A、25 人用方法 B。随后每名技术员处理样品 40 分钟,记录处理正确的数量。方法 A:$n_1=20$,$\bar{x}_1=30.4$,$s_1=8$。方法 B:$n_2=25$,$\bar{x}_2=25.4$,$s_2=6$。两组点图都大致对称、无离群点。是否有令人信服的证据表明两种方法下处理正确的平均数量不同?取 $\alpha=0.05$。(a) 陈述假设。(b) 检验条件并写出程序名称。(c) 求检验统计量与 p 值。(d) 结合情境作结论。(示意数据。)
| 部分 | 完整答案要点 |
|---|---|
| (a) | $\mu_1$、$\mu_2$ 分别是与这些相似的技术员在方法 A 与方法 B 之后处理正确的真实平均数量;差按 A 减 B 计算。$H_0: \mu_1=\mu_2$;$H_a: \mu_1\ne\mu_2$。 |
| (b) | 针对 $\mu_1-\mu_2$ 的双样本 $t$ 检验。技术员被随机分配到两种方法,所以两组独立(不需要 10% 条件)。每组 $n<30$,但点图大致对称且无离群点,故两组的正态性都合理。 |
| (c) | $SE=\sqrt{\dfrac{8^2}{20}+\dfrac{6^2}{25}}\approx 2.154$,$t=\dfrac{30.4-25.4}{2.154}\approx 2.32$。技术工具给出 $df\approx 34.4$,双侧 p 值 $\approx 0.0263$(2-SampTTest,Pooled: No)。手算取 $df=\min(20,25)-1=19$,p 值 $\approx 0.0315$,决定相同。 |
| (d) | 因为 $0.0263<0.05$,拒绝 $H_0$。有令人信服的证据表明,对与这些相似的技术员,方法 A 与方法 B 下处理正确的真实平均数量不同;样本中方法 A 平均高 5.0 个样品。$\mu_1-\mu_2$ 的 95% 区间为 $5.0\pm 2.031(2.154)$,约 $(0.62,\,9.38)$ 个样品,所以优势的大小并不精确。 |
| (e) | 随机分配支持对这些技术员就方法作出因果结论;技术员不是从全体技术员中随机选出的,所以结果不推广到与这些相似的技术员之外。 |
A two-sample $t$ test gives $t=2.40$ with $df\approx 20$ and p-value 0.026 for $H_a:\mu_1\ne\mu_2$. Conclusion at $\alpha=0.05$?双样本 $t$ 检验对 $H_a:\mu_1\ne\mu_2$ 得 $t=2.40$,$df\approx 20$,p 值 0.026。在 $\alpha=0.05$ 下的结论?
Since $0.026<0.05$, reject $H_0$: there is convincing evidence that the two population means differ.
由于 $0.026<0.05$,拒绝 $H_0$:有令人信服的证据表明两个总体均值不同。
Twelve pairs of twins: one twin is randomly assigned to each of two reading programs. Is this a two-sample or a paired design? What is $df$ for the $t$ test?12 对双胞胎:每对中随机把一人分到两种阅读项目之一。这是双样本还是配对设计?$t$ 检验的 $df$ 是多少?
Paired (matched pairs): each twin is linked to the sibling. Analyze the 12 differences with a one-sample $t$ test, $df=12-1=11$.
配对(匹配对):每个孩子都与其同胞相联系。对 12 个差值做单样本 $t$ 检验,$df=12-1=11$。
In a paired study, $n=8$ pairs give $\bar{x}_d=2.5$, $s_d=2.0$. Find the test statistic for $H_0:\mu_d=0$.在一项配对研究中,$n=8$ 对给出 $\bar{x}_d=2.5$、$s_d=2.0$。求 $H_0:\mu_d=0$ 的检验统计量。
$t=\dfrac{2.5-0}{2.0/\sqrt{8}}=\dfrac{2.5}{0.7071}=3.54$ with $df=7$.
$t=\dfrac{2.5-0}{2.0/\sqrt{8}}=\dfrac{2.5}{0.7071}=3.54$,$df=7$。
Skills Focus: Selecting an Appropriate Inference Procedure for Quantitative Data技能专题:为定量数据选择合适的推断程序
- Identify the variable type (categorical or quantitative) and the number of groups in a study.
- Select an appropriate inference procedure for a proportion or a mean: one-sample, two-sample, or paired.
- Name the procedure, check its conditions, and justify the choice in context.
- Decide between an interval and a test from the wording of the question.
- 识别研究中变量的类型(分类或定量)与组数。
- 为比例或均值选择合适的推断程序:单样本、双样本或配对。
- 写出程序名称、检验条件,并结合情境说明选择理由。
- 根据题目措辞在区间与检验之间做选择。
Choosing the correct procedure is a skill separate from computing it. Ask four questions in order. (1) What is the variable? A categorical variable with success/failure outcomes leads to a proportion and $z$ procedures (Units 8 and 9); a quantitative variable leads to a mean and $t$ procedures (this unit). (2) How many groups? One sample, or two? (3) How were the data collected? Two independent groups, or one group measured twice or matched into pairs? (4) What is the goal? Estimate a parameter (a confidence interval) or decide about a claim (a significance test)? Figure 7.6 shows the first-pass path.
选对程序是一项独立于计算的技能。依次问四个问题。(1) 变量是什么?只有成功/失败结果的分类变量导向比例(proportion)与 $z$ 程序(第 8、9 单元);定量变量导向均值(mean)与 $t$ 程序(本单元)。(2) 有几组?一个样本还是两个?(3) 数据如何收集?两个独立组,还是一组测两次或匹配成对?(4) 目标是什么?估计参数(置信区间)还是对某说法作决定(显著性检验)?图 7.6 给出了初步路径。
| Situation | Parameter | Procedure (TI-84) |
|---|---|---|
| One categorical variable, one sample | $p$ | One-proportion $z$ (1-PropZInt, 1-PropZTest) |
| One categorical variable, two independent groups | $p_1-p_2$ | Two-proportion $z$ (2-PropZInt, 2-PropZTest) |
| One quantitative variable, one sample | $\mu$ | One-sample $t$ (TInterval, T-Test) |
| One quantitative variable, two independent groups | $\mu_1-\mu_2$ | Two-sample $t$ (2-SampTInt, 2-SampTTest) |
| Two quantitative measurements on each unit (paired) | $\mu_d$ | One-sample $t$ on the differences (TInterval, T-Test on a list of differences) |
| 情境 | 参数 | 程序(TI-84) |
|---|---|---|
| 一个分类变量,一个样本 | $p$ | 单比例 $z$(1-PropZInt、1-PropZTest) |
| 一个分类变量,两个独立组 | $p_1-p_2$ | 双比例 $z$(2-PropZInt、2-PropZTest) |
| 一个定量变量,一个样本 | $\mu$ | 单样本 $t$(TInterval、T-Test) |
| 一个定量变量,两个独立组 | $\mu_1-\mu_2$ | 双样本 $t$(2-SampTInt、2-SampTTest) |
| 每个单位有两个定量测量(配对) | $\mu_d$ | 对差值做单样本 $t$(对差值列表用 TInterval、T-Test) |
Once you have chosen, justify the choice in a sentence that names the variable, the groups and the design, then check the conditions that belong to that procedure: for proportions, the large-counts (success/failure) conditions; for means, Normal or large sample for each group, or for the differences when the data are paired. A procedure is only valid if its conditions hold, and a correct name with unchecked conditions is an incomplete justification.
选定后,用一句话说明理由,写出变量、组与设计,然后检验属于该程序的条件:比例要检验大计数(成功/失败)条件;均值要对每组(配对时对差值)检验正态或大样本。只有条件成立,程序才有效;名称正确而条件未检验,是不完整的论证。
Worked Example 7.10a: choose the procedure for five scenarios例题 7.10a:为五个情境选择程序
Select an appropriate inference procedure for each scenario.
- A random sample of 150 voters; the researcher wants a confidence interval for the proportion who support a measure. One-proportion $z$ interval (categorical, one sample).
- Random samples from two cities; is the proportion of households with broadband different? Two-proportion $z$ test.
- A random sample of 40 phones; is the mean battery life less than the advertised 18 hours? One-sample $t$ test for $\mu$.
- Runners are randomly split into two groups, one with new shoes and one with old; compare the mean 5K time. Two-sample $t$ test for $\mu_1-\mu_2$.
- Twelve runners each run once in each shoe type; compare their mean times. Paired $t$ test (one-sample $t$ on the 12 differences), because each runner supplies two linked measurements.
为每个情境选择合适的推断程序。
- 随机抽取 150 名选民;研究者想要支持某措施的比例的置信区间。单比例 $z$ 区间(分类、一个样本)。
- 从两个城市各随机抽样;有宽带的家庭比例是否不同?双比例 $z$ 检验。
- 随机抽取 40 部手机;平均电池寿命是否低于宣传的 18 小时?针对 $\mu$ 的单样本 $t$ 检验。
- 跑者被随机分成两组,一组穿新鞋,一组穿旧鞋;比较平均 5 公里用时。针对 $\mu_1-\mu_2$ 的双样本 $t$ 检验。
- 12 名跑者各自穿两种鞋各跑一次;比较平均用时。配对 $t$ 检验(对 12 个差值做单样本 $t$),因为每名跑者提供两个相关联的测量。
Worked Example 7.10b: a full selection argument with conditions例题 7.10b:附条件的完整选择论证
A teacher gives the same 25 randomly chosen students a reading-speed test on paper and on a tablet, and asks whether the mean speed differs between formats.
- Which procedure? The variable is quantitative (words per minute), so a mean. Each student gives two linked measurements, so the data are paired. Choose a paired $t$ test of $H_0:\mu_d=0$ versus $H_a:\mu_d\ne 0$, with $d=\text{paper}-\text{tablet}$.
- Why not two-sample? The two sets are not independent: the same students appear in both.
- Conditions: random sample of students; 25 is under 10% of the students at a large school; with $n=25<30$, a graph of the 25 differences must show no strong skew or outliers.
- Why not a proportion? Speed is measured, not classified as success or failure.
老师让随机选出的同一批 25 名学生分别在纸质和平板上做阅读速度测验,并问两种形式的平均速度是否不同。
- 用哪个程序?变量是定量的(每分钟词数),所以是均值。每名学生提供两个相关联的测量,因此数据是配对的。选择配对 $t$ 检验,$H_0:\mu_d=0$ 对 $H_a:\mu_d\ne 0$,$d=\text{paper}-\text{tablet}$。
- 为什么不用双样本?两组数据不独立:同样的学生出现在两组中。
- 条件:学生为随机样本;25 人少于大型学校学生数的 10%;$n=25<30$,所以 25 个差值的图形必须没有明显偏斜或离群点。
- 为什么不用比例?速度是测量值,不是成功或失败的分类。
Worked Example: three scenarios, one procedure each, with conditions例题:三个情境,各选一个程序并检验条件
A school nurse studies sleep and phone use. For each scenario, name the inference procedure and parameter, and state the conditions that must be checked.
- (a) A random sample of 50 students reports hours slept on a school night and on a weekend night; the nurse wants an interval for how much longer students sleep on weekends. Each student gives two linked values, so the data are paired. Procedure: one-sample $t$-interval for $\mu_d$ (mean weekend minus school-night difference), $df=49$. Conditions: the 50 students are a random sample (under 10% of the school) and the 50 differences show no strong skew or outliers (or the sample is large).
- (b) Independent random samples of 80 freshmen and 90 seniors are asked whether they own a smartwatch; the nurse wants to know if ownership differs. The variable is categorical with two independent groups. Procedure: two-proportion $z$-test of $H_0: p_1=p_2$ (pooled), two-sided. Conditions: independent random samples, each under 10% of its class, and the expected successes and failures under the pooled proportion are at least 10 in both groups.
- (c) Forty students are randomly assigned to 20 using a phone-free study hour and 20 using phones; each takes the same quiz. The nurse asks whether the phone-free mean score is higher. The variable is quantitative with two independent groups. Procedure: two-sample $t$-test of $H_0: \mu_1=\mu_2$ against $H_a: \mu_1>\mu_2$, with the calculator $df$. Conditions: random assignment (no 10% condition), and for each group of 20 a roughly symmetric graph with no outliers.
- Why the design decides. (a) and (c) both involve a quantitative variable, yet (a) uses one sample of differences and (c) uses two samples, because in (a) every value is linked to another value from the same student. A complete answer states the variable, the number of groups, the design, the procedure and its conditions.
一位校医研究睡眠与手机使用。对每个情境,写出推断程序与参数,并说明必须检验的条件。
- (a) 随机抽取 50 名学生,报告上学日夜晚与周末夜晚的睡眠小时数;校医想要学生周末多睡多久的区间。每名学生给出两个相关联的值,所以是配对数据。程序:对 $\mu_d$(周末减上学日夜晚的平均差)的单样本 $t$ 区间,$df=49$。条件:50 名学生是随机样本(不到全校的 10%),且 50 个差值没有明显偏斜或离群点(或样本较大)。
- (b) 从新生和高三学生中各独立随机抽取 80 人和 90 人,询问是否拥有智能手表;校医想知道拥有率是否不同。变量是分类的,有两个独立组。程序:$H_0: p_1=p_2$ 的两比例 $z$ 检验(合并),双侧。条件:独立随机样本,各自不到本年级的 10%,且按合并比例计算的预期成功数与失败数在两组中都至少为 10。
- (c) 40 名学生被随机分配,20 人无手机自习,20 人可用手机;都做同一份测验。校医问无手机组的平均分是否更高。变量是定量的,有两个独立组。程序:$H_0: \mu_1=\mu_2$ 对 $H_a: \mu_1>\mu_2$ 的两样本 $t$ 检验,$df$ 取计算器给出的值。条件:随机分配(不需要 10% 条件),且每个 20 人的组图形大致对称、无离群点。
- 为什么设计决定程序。(a) 与 (c) 的变量都是定量的,但 (a) 用一个差值样本,(c) 用两个样本,因为 (a) 中每个值都与同一名学生的另一个值相连。完整的答案要写明变量、组数、设计、程序及其条件。
Choose the procedure by the data collection, not by the numbers given. Phrases that signal pairs: "the same subjects", "before and after", "twins", "matched". Phrases that signal two samples: "two independent random samples", "randomly assigned to two groups". Name the procedure in your answer; naming it shows your reasoning.
根据数据收集方式,而不是给出的数字,选择程序。提示配对的措辞:“同一批对象”“前后”“双胞胎”“匹配”。提示双样本的措辞:“两个独立随机样本”“随机分到两组”。作答时写出程序名称;写出名称能体现你的推理。
- Using $z$ for a mean because $n$ is large and $s$ is close to $\sigma$.
- Treating a mean difference as a proportion because the answer is a percent.
- Picking the procedure without checking its conditions.
- 因为 $n$ 大且 $s$ 接近 $\sigma$,就对均值用 $z$。
- 因为答案是百分数,就把均值之差当作比例。
- 选了程序却不检验其条件。
Two lists of the same length, or two columns in one table, do not make data paired; pairing comes from how the values were collected. Treating two independent groups of equal size as paired subtracts values that have nothing to do with each other, and treating true pairs as two samples ignores the link and loses power. Ask whether each value in one list is tied to exactly one value in the other; if it is, analyze the differences. Likewise, a percentage reported for each group is a proportion (use $z$), while a score or time for each unit is a mean (use $t$).
两列长度相同,或表中有两列,并不意味着数据是配对的;配对取决于数值是如何收集的。把两个大小相等的独立组当作配对,会去减彼此毫无关系的数值;把真正的配对当作两个样本,则忽略了关联并损失检验功效。要问:一个列表中的每个值是否恰好对应另一个列表中的一个值;若是,就分析差值。同样,对每组报告的百分比是比例(用 $z$),而每个单位的分数或时间是均值(用 $t$)。
A researcher compares the percent of defective items from two factories using independent random samples. Which procedure?研究者用独立随机样本比较两家工厂的次品率。用哪个程序?
A two-proportion $z$ procedure for $p_1-p_2$, because the variable is categorical (defective or not).
针对 $p_1-p_2$ 的双比例 $z$ 程序,因为变量是分类的(次品或非次品)。
Explain why before-and-after weights of 30 dieters call for a paired $t$ procedure and not a two-sample $t$.解释为什么 30 名节食者的前后体重需要用配对 $t$ 程序而不是双样本 $t$。
Each dieter supplies two linked weights, so the two sets are not independent. The analysis uses the 30 within-person differences and a one-sample $t$ with $df=29$.
每名节食者提供两个相关联的体重,所以两组数据不独立。分析使用 30 个个人内差值,做 $df=29$ 的单样本 $t$。
A random sample of 60 students gives a mean and standard deviation of their weekly study time. Which interval estimates the mean for all students?随机抽取 60 名学生,得到每周学习时间的均值与标准差。哪种区间估计全体学生的均值?
A one-sample $t$ interval (TInterval) for $\mu$, with $df=59$; the large sample size ($n\ge 30$) satisfies the Normal condition.
针对 $\mu$ 的单样本 $t$ 区间(TInterval),$df=59$;样本量大($n\ge 30$)满足正态条件。
Exam Toolkit and TI-84 Summary考试工具与 TI-84 汇总
| Task | TI-84 command | Inputs |
|---|---|---|
| One-sample interval for $\mu$ | TInterval | Data or Stats ($\bar{x}$, Sx, $n$), C-Level |
| One-sample test for $\mu$ | T-Test | $\mu_0$, $\bar{x}$, Sx, $n$ (or list), $\mu\ne$, $<$, $>$ $\mu_0$ |
| Interval for $\mu_1-\mu_2$ | 2-SampTInt | $\bar{x}_1$, Sx1, $n_1$, $\bar{x}_2$, Sx2, $n_2$, C-Level, Pooled: No |
| Test for $\mu_1-\mu_2$ | 2-SampTTest | same inputs, alternative $\mu_1\ne,<,>\mu_2$, Pooled: No |
| Paired data | TInterval or T-Test | Compute L3=L1-L2, then use the list L3 |
| $t$ probability | tcdf(lower,upper,df) | use -1E99 or 1E99 for the open end |
| $t^*$ critical value | invT(area to the left,df) | e.g. invT(0.975,24) for 95%; on older TI-84 Plus models without invT, use a $t$ table or the calculator's inverse-$t$ if available |
| 任务 | TI-84 命令 | 输入 |
|---|---|---|
| $\mu$ 的单样本区间 | TInterval | Data 或 Stats($\bar{x}$、Sx、$n$)、C-Level |
| $\mu$ 的单样本检验 | T-Test | $\mu_0$、$\bar{x}$、Sx、$n$(或列表)、$\mu\ne$、$<$、$>$ $\mu_0$ |
| $\mu_1-\mu_2$ 的区间 | 2-SampTInt | $\bar{x}_1$、Sx1、$n_1$、$\bar{x}_2$、Sx2、$n_2$、C-Level、Pooled: No |
| $\mu_1-\mu_2$ 的检验 | 2-SampTTest | 输入相同,备择假设 $\mu_1\ne,<,>\mu_2$,Pooled: No |
| 配对数据 | TInterval 或 T-Test | 先算 L3=L1-L2,再使用列表 L3 |
| $t$ 概率 | tcdf(下限,上限,df) | 开口端用 -1E99 或 1E99 |
| $t^*$ 临界值 | invT(左侧面积,df) | 例如 95% 用 invT(0.975,24);没有 invT 的旧款 TI-84 Plus 请查 $t$ 表,或使用计算器自带的反 $t$ 功能(若有) |
| If the question says | Write |
|---|---|
| Construct and interpret an interval | Procedure name; conditions in context; interval with units; "We are __% confident that the interval from __ to __ captures the true mean ... of ..." |
| Do the conditions hold? | Random; 10% condition; Normal (large $n$, or graph with no strong skew or outliers) for each group or for the differences |
| Is the claim plausible? | Does the interval contain the claimed value (or 0 for a difference)? Then "plausible / consistent with" or "convincing evidence" |
| Carry out a test | $H_0$, $H_a$ with parameter defined; conditions; $t$, $df$, p-value; compare with $\alpha$; reject or fail to reject; conclusion in context |
| Paired or two-sample? | Linked measurements on the same or matched units: paired, analyze the differences. Separate unrelated groups: two-sample |
| 题目问 | 写什么 |
|---|---|
| 构造并解释区间 | 程序名称;结合情境的条件;带单位的区间;“我们有 __% 的把握认为从 __ 到 __ 的区间包含……的真实平均……” |
| 条件成立吗? | 随机;10% 条件;每组或差值的正态性(大 $n$,或图形无明显偏斜与离群点) |
| 该说法合理吗? | 区间是否包含所声称的值(差值则看 0)?然后写“合理 / 相容”或“令人信服的证据” |
| 实施检验 | 定义参数的 $H_0$、$H_a$;条件;$t$、$df$、p 值;与 $\alpha$ 比较;拒绝或不拒绝;结合情境的结论 |
| 配对还是双样本? | 同一或匹配单位上的相关联测量:配对,分析差值。彼此无关的独立组:双样本 |
Unit FRQ: Fertilizer Experiment单元简答题:肥料实验
Prompt. A gardening company wants to know whether a new fertilizer increases the mean height of a pea plant after 30 days. It randomly assigns 24 seedlings, 12 to the new fertilizer and 12 to the standard fertilizer. Heights (cm): new fertilizer, $\bar{x}_1=31.8$, $s_1=4.6$; standard fertilizer, $\bar{x}_2=27.9$, $s_2=5.1$. Dotplots of both groups are roughly symmetric with no outliers. (a) State the hypotheses. (b) Check the conditions and name the procedure. (c) Find the test statistic and p-value. (d) Conclude at $\alpha=0.05$. (e) What kind of conclusion does the design allow?
| Part | What a complete answer states |
|---|---|
| (a) | $\mu_1$ and $\mu_2$ are the true mean heights (cm) after 30 days of seedlings like these given the new and the standard fertilizer. $H_0:\mu_1=\mu_2$; $H_a:\mu_1>\mu_2$. |
| (b) | Two-sample $t$ test for $\mu_1-\mu_2$. Random assignment of seedlings to treatments; each group has $n=12<30$ but its dotplot is roughly symmetric with no outliers, so Normality is reasonable. (The 10% condition is not needed in an experiment.) |
| (c) | $t=\dfrac{3.90}{\sqrt{\dfrac{4.6^2}{12}+\dfrac{5.1^2}{12}}}=\dfrac{3.90}{1.983}=1.97$, $df\approx 21.8$, p-value $\approx 0.0310$ (2-SampTTest, $\mu_1>\mu_2$, Pooled: No). |
| (d) | Since 0.0310 is less than $0.05$, reject $H_0$. There is convincing evidence that the new fertilizer gives a greater mean pea-plant height after 30 days than the standard fertilizer. |
| (e) | Because seedlings were randomly assigned, the difference can be attributed to the fertilizer (cause and effect). The seedlings were not a random sample of all pea plants, so the conclusion applies to seedlings like these. |
题目。某园艺公司想知道新肥料能否使豌豆苗 30 天后的平均高度增加。公司把 24 株幼苗随机分配,12 株用新肥料,12 株用标准肥料。高度(厘米):新肥料,$\bar{x}_1=31.8$,$s_1=4.6$;标准肥料,$\bar{x}_2=27.9$,$s_2=5.1$。两组点图都大致对称、无离群点。(a) 陈述假设。(b) 检验条件并写出程序名称。(c) 求检验统计量与 p 值。(d) 在 $\alpha=0.05$ 下作结论。(e) 该设计允许得出哪类结论?
| 部分 | 完整答案要点 |
|---|---|
| (a) | $\mu_1$、$\mu_2$ 是与这些幼苗相似的幼苗使用新肥料与标准肥料 30 天后的真实平均高度(厘米)。$H_0:\mu_1=\mu_2$;$H_a:\mu_1>\mu_2$。 |
| (b) | 针对 $\mu_1-\mu_2$ 的双样本 $t$ 检验。幼苗被随机分配到处理;每组 $n=12<30$,但点图大致对称且无离群点,故正态性合理。(实验不需要 10% 条件。) |
| (c) | $t=\dfrac{3.90}{\sqrt{\dfrac{4.6^2}{12}+\dfrac{5.1^2}{12}}}=\dfrac{3.90}{1.983}=1.97$,$df\approx 21.8$,p 值 $\approx 0.0310$(2-SampTTest,$\mu_1>\mu_2$,Pooled: No)。 |
| (d) | 由于 0.0310 小于 $0.05$,拒绝 $H_0$。有令人信服的证据表明新肥料使豌豆苗 30 天后的平均高度大于标准肥料。 |
| (e) | 因为幼苗是随机分配的,差异可归因于肥料(因果)。幼苗不是所有豌豆苗的随机样本,所以结论适用于与这些相似的幼苗。 |
Common Errors and Their Corrections常见错误与修正
| Error | Correction |
|---|---|
Using $z$ or normalcdf for a mean with unknown $\sigma$ | Use $t$ with $df=n-1$ (tcdf, invT) |
| Writing the Normal condition as "the data are normal" with no evidence | For $n<30$ describe the graph (no strong skew, no outliers); for $n\ge 30$ cite the sample size |
| "95% of the data are in the interval" | We are 95% confident the interval captures the true mean |
| Hypotheses written with $\bar{x}$ | Use $\mu$, $\mu_1$, $\mu_2$ or $\mu_d$, defined in context |
| One-sided p-value reported for a two-sided $H_a$ | Double the tail area |
| "Accept $H_0$" or "the null is true" | Fail to reject $H_0$; the data do not provide convincing evidence for $H_a$ |
| Two-sample test on paired data | Take the differences; one-sample $t$ with $df=n-1$ pairs |
| Pooling the variances for a two-sample test | Choose Pooled: No |
| 错误 | 修正 |
|---|---|
$\sigma$ 未知时对均值使用 $z$ 或 normalcdf | 使用 $df=n-1$ 的 $t$(tcdf、invT) |
| 没有依据就写“数据服从正态” | $n<30$ 时描述图形(无明显偏斜、无离群点);$n\ge 30$ 时引用样本量 |
| “95% 的数据落在区间内” | 我们有 95% 的把握认为区间包含真实均值 |
| 用 $\bar{x}$ 写假设 | 使用结合情境定义的 $\mu$、$\mu_1$、$\mu_2$ 或 $\mu_d$ |
| 双侧 $H_a$ 却报告单侧 p 值 | 把尾部面积加倍 |
| “接受 $H_0$”或“零假设为真” | 不拒绝 $H_0$;数据没有提供支持 $H_a$ 的令人信服的证据 |
| 对配对数据做双样本检验 | 取差值;以对数计 $df=n-1$ 的单样本 $t$ |
| 双样本检验时合并方差 | 选择 Pooled: No |
Flashcards闪卡
Select a card to reveal the answer.
点击卡片查看答案。
Unit Quiz单元自测
Choose an answer to see feedback.
选择答案查看反馈。
B. Only the test assumes the two proportions are equal.
B。只有检验才假定两个比例相等。
C. The interval contains 0, so no difference is plausible, but equality is not proven.
C。区间含 0,所以无差异是合理的,但相等并未被证明。
C. Zero is plausible, but this does not prove the means are equal.
C。0 是合理取值,但这并不证明均值相等。
B. Each student gives two linked scores, so analyze the differences.
B。每名学生有两个相关联的分数,所以应分析差值。
C. The variable is categorical (defective or not) with two independent groups.
C。变量是分类的(次品与否),有两个独立组。
B. The 10% condition protects independence when sampling without replacement; random assignment to treatments does not sample a population.
B。10% 条件保护不放回抽样时的独立性;随机分配到处理并不是从总体中抽样。
B. An interval keeps each group's own $\hat{p}$ and adds the variances. The pooled value 0.0675 belongs to a test of $H_0: p_1=p_2$, and standard errors are never added directly.
B。区间保留每组各自的 $\hat{p}$ 并把方差相加。合并值 0.0675 属于 $H_0: p_1=p_2$ 的检验,标准误绝不能直接相加。
C. Variances add: $\dfrac{900}{40}+\dfrac{625}{50}=22.5+12.5=35$, and $\sqrt{35}\approx 5.92$. Adding the two standard errors, as in A, is the usual mistake.
C。方差相加:$\dfrac{900}{40}+\dfrac{625}{50}=22.5+12.5=35$,$\sqrt{35}\approx 5.92$。像 A 那样把两个标准误相加,是常见错误。
B. Reject $H_0$ because $0.01<0.05$. Random assignment allows a causal conclusion, but the volunteers were not randomly selected, so it applies to volunteers like these only.
B。因为 $0.01<0.05$ 拒绝 $H_0$。随机分配允许因果结论,但志愿者不是随机选出的,所以只适用于与这些志愿者相似的人。
A. Variances add: $\dfrac{100}{36}+\dfrac{144}{49}\approx 2.778+2.939=5.717$ and $\sqrt{5.717}\approx 2.391$, so $t\approx 2.09$. B adds standard errors, C pools the variances, and D leaves out the second group.
A。方差相加:$\dfrac{100}{36}+\dfrac{144}{49}\approx 2.778+2.939=5.717$,$\sqrt{5.717}\approx 2.391$,所以 $t\approx 2.09$。B 把标准误相加,C 合并了方差,D 漏掉了第二组。
B. A two-sided test at $\alpha=0.05$ rejects $H_0$ exactly when the 95% interval excludes 0, and $0.03<0.05$. The interval's midpoint is the sample difference $\bar{x}_1-\bar{x}_2$, not 0.
B。当 95% 区间不含 0 时,$\alpha=0.05$ 的双侧检验恰好拒绝 $H_0$,而 $0.03<0.05$。区间的中点是样本差 $\bar{x}_1-\bar{x}_2$,不是 0。
C. With $n<30$ the Normal condition needs a roughly symmetric graph with no outliers in each group. Pooling changes the standard error, not the shape, and $z$ is not used when $\sigma$ is unknown.
C。$n<30$ 时,正态条件要求每组图形大致对称且无离群点。合并改变的是标准误而不是形状,而 $\sigma$ 未知时不用 $z$。